← Back to all sparks
V

Vitest

DEVOPS
Velocity2.5

Blazing-fast unit test framework powered by Vite

A major version being built in the open, one breaking change at a time.

testingmajor-version-betabreaking-changesbrowser-modebenchmark-apiagent-authored-commits
Current state
Every visible release is a 5.0.0 beta, and every one leads with a Breaking Changes section. The changes are the kind that only land in a major: mocks now clear by default before each test, toHaveTextContent became strict, the benchmark public API was rewritten, config lookup no longer walks ancestor directories, and webdriverio was dropped outright. Roughly one beta every three weeks.
Where it's heading
The through-line is tightening defaults and shrinking surface area. Vitest is removing implicit behavior users had come to rely on — ancestor config discovery, loose text matching, mocks persisting between tests — and consolidating packages, with @vitest/runner inlined and no longer published separately. Browser mode is getting the most net-new investment: trace views in the editor panel, nested mark traces, locators.exact on by default, a session ID required for orchestrator requests. Notably, a large share of these commits are co-authored with coding agents, credited by name in the release notes.
Prediction
The beta series is still introducing breaking changes as of beta.7, so a stable 5.0.0 does not look imminent; expect at least another beta or two before the breaking-change section stops growing.

Recent moves

  1. 15d ago

    Vitest 5.0.0-beta.7 splits config resolution from server creation

    Separates config resolution from server creation, a structural change that makes the config layer independent of Vite server lifecycle. Adds a pluggable benchmark provider API, following the benchmark API rewrite two betas earlier, and promotes fsModuleCache to a top-level option.

    View source ↗
  2. 1mo ago

    Vitest 5.0.0-beta.6 clears mocks by default, drops webdriverio

    Carries the beta series' most consequential default flip: mocks are cleared before each test automatically, which changes behavior for any suite relying on them persisting. Also drops webdriverio, adds Temporal mocking via updated fake-timers, and moves json and junit reporter output into .vitest by default.

    View source ↗
  3. 1mo ago

    Vitest 5.0.0-beta.5 ends ancestor config lookup, inlines runner

    Stops config file lookup from walking ancestor directories and inlines @vitest/runner so it is no longer published as its own package — both consolidation moves that reduce the number of things users configure or install. Browser mode gains nested mark traces in the UI.

    View source ↗
  4. 2mo ago

    Vitest 5.0.0-beta.4 rewrites the benchmark API

    Rewrites the benchmark public API, makes toHaveTextContent strict with toMatchTextContent as the loose alternative, and enables browser locators.exact by default. The strictness theme that defines this beta series is visible in all three.

    View source ↗