# Vitest: 8.9 out of 10

A strong pick. 2nd of 10 in [Testing tools](https://elestia.ai/opensource/testing/index.md).

Vitest is a fast test runner built on Vite. It is Jest-compatible and covers unit, component and real-browser tests. It is the strongest default for new JavaScript and TypeScript projects today. Its use is growing much faster than Jest's, and survey satisfaction is very high.

**Best for:** Any new JavaScript or TypeScript project that wants a fast, Jest-compatible unit and component test runner with native ESM and TypeScript, and an optional real-browser mode.

## Scores

- **Overall: 8.9** (likely 8.1 to 9.6)
  - Claude Opus 5.5 (9.0): Vitest is now the default unit and component test runner for new projects. It is fast, Jest-compatible, actively maintained, paid for, and rated highest in surveys. Its usage is growing much faster than Jest's. Yearly breaking majors and dev-server advisories are the main costs, and Playwright remains the pick for full end-to-end tests.
  - GPT-6.2 Sol (8.7): Vitest is my first choice for unit and component testing in a new Vite project and a strong choice for modern Node.js projects. Its typed tooling, real-browser component tests, active maintenance, and framework backing give it an edge over Jest for that use. Suite-specific performance, major-version migration costs, and Playwright Test’s advantage for full browser journeys keep the recommendation scoped.
- **Needed by many: 8.1** (likely 7.0 to 9.1)
  - Claude Opus 5.5 (8.0): Most JavaScript and TypeScript projects need a unit test runner, and Vitest is not tied to one framework or to Vite apps only. Browser Mode widens it to component tests. Full end-to-end testing is still Playwright's job, which keeps the score below 9.
  - GPT-6.2 Sol (8.2): Unit testing is useful across JavaScript and TypeScript, and Vitest serves Node.js libraries and services as well as web apps. Browser Mode extends that reach across several frontend frameworks. The modern Node.js and Vite requirements narrow its fit for older stacks, and the surveys do not measure how many projects need this particular combination.
- **Helps a lot: 8.9** (likely 7.9 to 9.7)
  - Claude Opus 5.5 (9.0): Vitest has a fast watch mode, native ESM and TypeScript, a Jest-compatible API, built-in coverage, typed tests, and real-browser component testing. Vitest 5 adds speed gains of 8 to 25%, vi.when, a trace view and vitest doctor. Its limits are mocking edge cases and little speed gain for suites that create many jsdom environments.
  - GPT-6.2 Sol (8.8): Vitest 5.1.1 combines typed assertions, targeted watch reruns, coverage, and real-browser component testing, and the release improves assertion diffs. Subito measured slower default runs in some repositories and needed worker tuning, so performance depends on the suite. The agent guide documents a common mistake where generated tests use Jest’s mocking API. Playwright Test has a more complete workflow for end-to-end browser testing.
- **Holds up over time: 8.9** (likely 7.8 to 9.6)
  - Claude Opus 5.5 (9.0): The project had 1,294 commits and 48 releases in the last year, and 846 contributors. Its core team is paid through VoidZero, which is now part of Cloudflare, plus Open Collective. The ecosystem is moving towards it and away from Jest. The yearly breaking majors keep the score just below the top.
  - GPT-6.2 Sol (8.7): Vitest recorded 1,294 commits and 48 GitHub releases in a year, and Cloudflare backs the VoidZero team. A reported watch-mode regression got a merged fix in six days, and the project documents which release lines receive backports. Major upgrades still bring runtime and behavior changes, and Remotion reported a browser rendering regression while evaluating 5.0.
- **Used widely: 8.1** (likely 7.0 to 9.0)
  - Claude Opus 5.5 (9.0): Downloads rose from 72M to 723M per 4 weeks, a ratio of about 10x against a median of 4.1. That is now about three times Jest, whose ratio is 1.8. Some downloads come from scaffolds and frameworks that install it by default. The ecosyste.ms dependents count of 30.5k repos lags Jest's 2.1M because the project is younger, but surveys confirm fast-rising use.
  - GPT-6.2 Sol (7.2): Four-week npm downloads grew about 10.0 times year over year, well above the 4.1 catalog baseline, and surveys support the adoption trend. CI and framework defaults turn each project into many installs, so the 723 million downloads give little indication of the number of direct choices. Ecosyste.ms found about 30,600 dependent repositories, far below Jest’s count, though Vitest leads both Jest and Playwright in the bundle’s Bluesky activity.
- **Vouched for: 9.0** (likely 8.0 to 9.8)
  - Claude Opus 5.5 (9.0): State of JS 2025 shows about 97% positive opinion and the most interest in the category, and the survey expects Vitest to overtake Jest. Many independent migration reports and benchmarks agree. Major frameworks and toolchains such as Nuxt, SvelteKit, Angular and Vite+ build on it or default to it.
  - GPT-6.2 Sol (9.0): State of JavaScript 2025 reports 97% retention among Vitest users. Angular CLI uses it by default, Storybook builds its component testing addon on it, and Miro migrated about 70,000 application tests from Jest. These sources cover different uses, though the survey is self-selected and the migration results reflect individual codebases.
- **Safe: 7.1** (likely 6.0 to 8.1)
  - Claude Opus 5.5 (7.0): There were three advisories in 24 months, two of them critical, all in the UI and API servers. They matter only when those servers listen or are exposed to a network. Fixes shipped with safe defaults: allowWrite and allowExec are off for non-localhost hosts. It is a dev dependency with 13 direct dependencies, an MIT licence and no Scorecard data, so the risk is moderate rather than low.
  - GPT-6.2 Sol (7.1): Vitest uses the permissive MIT license and has 13 direct dependencies before optional browser tooling. Maintainers patched the critical server flaws in the bundle and backported several fixes, but one browser-related fix needed a follow-up patch. GitHub lists additional advisories beyond the bundle, and the published fixes cover 5.1.1. The release workflow uses npm trusted publishing, provenance, and separate approval, while the missing OpenSSF Scorecard leaves other repository controls less certain.

## Good

- Native ESM and TypeScript support through the Vite pipeline, so most projects need almost no configuration.
- A Jest-compatible API (expect, vi.mock, snapshots), so migrating from Jest is mostly mechanical and AI agents write correct tests easily.
- Browser Mode runs component tests in real browsers through Playwright, and Vitest 5 adds a trace view.
- Very active, funded maintenance, with dozens of releases a year and a large contributor base.

## Bad

- Major versions arrive about once a year with real breaking changes, such as clearMocks defaulting to true and new output paths in Vitest 5.
- Ecosystem tools sometimes lag a major release; Cloudflare's pool pinned to v4 failed on v5.
- The UI and API servers had two critical advisories in 24 months, so they must not be exposed to a network.
- Suites that create many jsdom environments see little speed gain over Jest.

## The numbers

- Downloads, 4 weeks: 723M
- In a year: ×10
- GitHub stars: 17k
- Commits, 12 months: 1.3k
- Last npm release: Nov 2026
- Advisories, 24 months: 3
- Licence: MIT
- GitHub: https://github.com/vitest-dev/vitest
- npm: https://www.npmjs.com/package/vitest

Scores run from 0 to 10 and are the mean of the scores of AI reviewers (Claude Opus 5.5, GPT-6.2 Sol), made on 21 November 2026 from GitHub, npm, OSV, OpenSSF Scorecard, ecosyste.ms, Hacker News and Bluesky data and a web search. The ecosyste.ms count of repositories that use a project is far too low for projects that grew in the last few years, and some reviews quote it. Overall is the reviewers' own judgement for a new project today, not an average of the parts. An AI wrote them and can be wrong.
