Jest vs Vitest: open-source unit testing and test runners tools compared
Metrics as of , from the GitHub or GitLab API of each repository. Refreshed monthly.
Summary
Jest: JavaScript testing framework with a CLI, watch mode, matchers and snapshot testing.
Vitest: Vite-based test framework for JavaScript and TypeScript with Jest-compatible APIs, snapshots, mocking, coverage and a browser mode.
Both are listed under Unit testing and test runners. The table gives repository metrics from the GitHub API with their fetch date, then the documented facts used for every comparison in this category, each linked to the README or docs page it comes from. A cell reads "not documented" when the fact was not found in the project's documentation; that does not mean the feature is absent.
Side by side
| Fact | Jest | Vitest |
|---|---|---|
| Stars | 45,4631 | 17,1431 |
| Forks | 6,7251 | 2,0171 |
| Contributors | 1,7671 | 8191 |
| Last release | 2026-09-181 | 2026-09-151 |
| Last commit | 2026-09-181 | 2026-09-181 |
| Commits in 90 days | 1121 | 2811 |
| License | MIT1 | MIT1 |
| Primary language | TypeScript1 | TypeScript1 |
| Status | active1 | active1 |
| Languages for writing tests | JavaScript; TypeScript via Babel or ts-jest source: README | JavaScript and TypeScript, with JSX source: README |
| Test authoring format | Code (test files using test() and expect() matchers) source: README | Code (describe/it test files with Chai and Jest-compatible expect) source: README |
| Parallel or distributed execution | Worker pool sized with --maxWorkers; test suite sharding with --shard source: Docs: Jest CLI Options | Test files in parallel workers; sharding across machines (--shard with the blob reporter) source: Docs: Improving Performance |
| CI integration | --ci option for CI environments (new snapshots fail instead of being written) source: Docs: Jest CLI Options | GitHub Actions reporter with annotations for test failures source: Docs: Reporters |
| Report formats | Coverage reporters clover, JSON, lcov and text by default; default, summary and github-actions test reporters source: Docs: Configuring Jest | Default, verbose, tree, dot, JUnit XML, JSON, HTML, TAP, TAP flat, GitHub Actions, blob; custom reporters source: Docs: Reporters |
| Install method | npm (npm install --save-dev jest) or yarn (yarn add --dev jest) source: README | npm (npm install -D vitest); yarn, pnpm and bun also documented source: Docs: Getting Started |
1 Fetched from the GitHub or GitLab API on . Hover a value for its own date.
When each fits
Written from each project's documented scope, not from preference. Neither tool is ranked.
Jest
Fits projects that test JavaScript code, including snapshot tests; its README describes a JavaScript testing solution that works out of the box for most JavaScript projects. source: README
Vitest
Fits projects that build with Vite and test with the same setup as the app; its README describes reuse of Vite's config, transformers, resolvers and plugins. source: README
More on these tools
Sources
- GitHub REST API: repository, read
- GitHub REST API: repository, read
- GitHub REST API: contributors, read
- GitHub REST API: contributors, read
- GitHub REST API: latest release, read
- GitHub REST API: latest release, read
- GitHub REST API: commits, read
- GitHub REST API: commits, read
- README, read
- README, read
- Docs: Jest CLI Options, read
- Docs: Improving Performance, read
- Docs: Reporters, read
- Docs: Configuring Jest, read
- Docs: Getting Started, read
Documented facts collected 2026-09-22. See the methodology for how metrics and facts are gathered.