As reported on November 17, 2026, VoidZero released Vitest 5.0 with a focus on test speed, alongside changes to browser debugging and several long-standing defaults.
In benchmarks covering projects from a five-file utility package to a 1,280-module application, the Vitest team reported performance gains of about 8% to 25% in most configurations and up to 53% for VM pools. The team attributed the gains to inline projects sharing one Vite server, a stable disk fsModuleCache, fewer round trips between the main process and workers, and reusable compiled code in VM pools. A new vitest doctor command can rerun a test suite under different configurations and suggest faster options.
Browser Mode adds Trace View, which records interactions and assertions as DOM snapshots for step-by-step review. The new vi.when API lets one spy return different values based on its arguments.
Existing test suites may need changes. clearMocks now defaults to true; asynchronous assertions without await fail instead of producing a warning; hoisted vi.mock calls outside the top-level scope throw errors; and toThrow('') now matches any error. OpenReplay’s analysis identified call-count assertions that depend on mock history leaking between tests as a particular migration risk.
Vitest 5 requires Vite 6.4 and Node.js 22.12 or newer. Yarn users must install Vite themselves because it is now a peer dependency. Reports, attachments and blob reports have moved to .vitest/, so CI artifact paths may need updating. Ecosystem support was still catching up at the time of the report: an issue for Cloudflare’s vitest-pool-workers said its peer dependency range remained pinned to Vitest 4, which could prevent affected projects from running tests after an upgrade.