
About Vitest
Vitest is a testing framework built on Vite. It runs tests for Vite apps and for backend code, and its API is close to Jest, so migrating is usually simple.
What it does
Vitest runs unit tests and reuses the Vite config and plugins from your app. Tests and the app therefore share the same resolve and transform setup. Its watch mode reruns only the tests related to the files you changed. ESM, TypeScript and JSX work out of the box, and you can use Vitest even if the project does not use Vite.
Key features
- Expect, snapshots and coverage, Jest-style
- Watch mode that reruns only related tests
- ESM, TypeScript and JSX without extra setup
- Reuses your Vite config and plugins
- Works for backend code as well as front ends
Who it's for
Frontend developers who use Vite, and teams that want to move away from Jest. Backend developers who want a fast test runner without a Vite app will also find it useful.
Pricing and good to know
Vitest is free and open source under the MIT licence. It is maintained by an open-source team and supported by sponsors. The documentation covers several past releases as well as the current one, so you can match the version you use.
Highlights
- Write unit tests with a Jest-style API
- Rerun only the tests affected by a change
- Test TypeScript, ESM and JSX code directly
- Reuse your Vite config and plugins in tests
- Measure test coverage with a built-in report












