Command Palette

Search for a command to run...

position in category
#2

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:

  • Shared config with Vite, dev and build
  • Jest-compatible API: expect, snapshots, mocks, coverage
  • Component testing for Vue, React, Svelte, Lit, Marko
  • Smart watch mode with module-graph awareness
  • Benchmarking and type testing support
  • Sharding for CI and coverage via v8 or Istanbul

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.

GitHub Repositories
2.5K
-1.7%
Trending down this week
Removed in 44 repos