Search for a command to run...
Vite-native unit and component test framework that reuses your Vite config, plugins, and transform pipeline for a unified dev, build, and test experience. Expect, snapshots, coverage, and mocking work out of the box, with ESM, TypeScript, and JSX support powered by the same tooling as your app.
Backed by sponsors such as Vercel, Chromatic, and Bolt. Differentiates from Jest by sharing Vite's resolution and transformation instead of maintaining a separate pipeline, often yielding an order of magnitude faster runs on migrated projects. Watch mode runs affected tests on change, similar to HMR for tests.
Key features:
Teams use Vitest for unit and component tests in Vite projects, for migrating Jest suites without config duplication, and for backend or non-Vite Node code that benefits from the same API. Integrates with ESLint, coverage reporters, and CI via blob merge for parallel shards.