New --last-failed flag runs only previously failed tests and --since-last-run limits runs to tests changed since the last execution, alongside fake timer support for node:timers and node:timers/promise and interactive failed-snapshot review. Fixed setup files not rerunning after --changed filtering and mock factories that form cycles later, and the browser mode default port changed to 23315.
vitest
npx @buildinternet/releases get vitestThe mocker now hardens manual and redirect mocks, backported to the v4 branch.
Hook cleanups now run when a later hook fails, and mocks of finished test files are released to avoid leaks. Also abort all running tests on cancel, keep the Vite default fs.deny with an api token file, and fix browser-mode issues around global setup and closed sessions.
fsModuleCache is now enabled by default, and the trace viewer gains fit and zoom controls plus highlighting of multiple selector matches. Fixed coverage memory leaks, V8 browser leak between test files, module mock resolution in directories with spaces, and Map/Set deep equality in assertions.
Fixed result.status leaking between repeats runs and mock path boundary checks in browser mode, where configs of browser-consumed environments are now kept and the server listen is delayed until tests start. Also revalidates imports of cached modules and scopes cache key generators to projects.
Fixed toMatchObject handling of asymmetric matchers and a stack overflow when spying Set.prototype.add. Also fixes jsdom 28+ Request with Blob body, concurrent createReport calls, agent reporter --silent, and UI auth cookie persistence.
vitest list now exits with code 1 when collection fails, parse error details are preserved in static collection, and deepMerge no longer mishandles prototypes. Also adds a focused trace view layout mode and a trace attempts selector in the UI header, plus a warning when the deprecated deps.optimizer.web is used.
Vitest 5 is officially out! This release focuses on performance and brings a lot of new features while fixing long-standing bugs. See our blog post for the official announcement. 🚨 Breaking Changes Replace loupe.inspect with pretty-format - by…
vitest list now parses files statically by default, replacing the previous behavior that relied on running the test files. Also promotes clearCache out of experimental, adds a link to open Playwright traces in the UI, and includes several bug fixes.
parseSpecifications is no longer experimental. Coverage now uses @vitest/istanbuljs packages, and UI features include source-location highlighting and keyboard navigation for trace steps. Several bug fixes roll in across browser, coverage, snapshot, and worker handling.
Revived the global concurrency limit for test lifecycle in a backport to v4. Also backported fixes that encode iframeId in tester iframe URLs, trigger playwright/chromium gc on low disk availability, and restrict redirect mocks to the fs allowlist.
Browser tests now fail instead of hanging when the browser stops responding, and the GitHub Actions reporter supports a custom summary title and displays test names. Multiple fixes across browser, pool, and UI, including requiring auth for coverage report requests and preserving the root during config resolution.
Tests now fail when an asynchronous assertion is not awaited, inline projects extend the root config by default, and nested projects are now supported. Also enables Temporal mocking without fake timers, uses > as separator in -t test filtering, shares the Vite server between inline projects, and preserves class mock prototype methods on instances.
Config resolution is now separated from server creation, a breaking change for programmatic usage. New features include a pluggable benchmark provider API, toggable injectCjsGlobals option, and performance improvements through warm modules, Node compile cache, and bundled dependencies.
Mocks now clear by default before each test, and JSON and JUnit reporter output files are written to .vitest by default instead of the project root. The HTML reporter output also moves to .vitest. Added vi.when() for conditional mocking, support for mocking Temporal with updated @sinonjs/fake-timers, screenshotDirectory config for browser.expect.toMatchScreenshot, and webdriverio package removal. Plus fixes for per-project sequence config, coverage offset calculation, worker startup errors, and browser locator timeouts.
Fixed file system access checks in browser builtin commands and external module resolution errors in the VM when using the deps optimizer with encoded URIs.
Fixed a filesystem access check in browser builtin commands.
🐞 Bug Fixes Fix importOriginal with optimizer and query import [backport to v4] - by Hiroshi Ogawa, David Harris, Codexand Vladimir in https://github.com/vitest-dev/vitest/issues/10546 (a5180) browser: Wait for orchestrator readiness before resolving browser…
Don't lookup config file from ancestor directories - by @hi-ogawa, Codex and Hiroshi Ogawa in https://github.com/vitest-dev/vitest/issues/10428 (945d9) Inline @vitest/runner package, do not publish it anymore - by @sheremet-va in…
Pin last supported vite-node version - by @sheremet-va (16f12)
