Vitest
Dev ToolsNext generation testing framework powered by Vite.
Release History
v4.0.169 fixes2 featuresVitest v4.0.16 primarily delivers bug fixes, introduces the experimental `setupEnvironment` export, and deprecates `test.poolOptions`.
v4.0.1513 fixes2 featuresThis release adds experimental cache opt‑out and import‑duration reporting, and includes numerous bug fixes such as corrected IDs in Bun/Deno, improved dependency handling, and stability enhancements across reporters, coverage, and web‑worker APIs.
v4.0.14Breaking9 fixes3 featuresVitest v4.0.14 introduces experimental browser, runner, and UI features, adds several bug fixes, and renames `collect` to `import` (removing `prepare`), requiring a small migration for affected configurations.
v4.0.132 fixesThis patch release (v4.0.13) fixes type‑related issues and adds performance improvements such as cached module fetches.
v4.0.122 fixesVersion 4.0.12 introduces two bug fixes: default inheritance of `fsModuleCachePath` and removal of `@opentelemetry/api` imports from public types.
v4.0.114 featuresVitest v4.0.11 introduces experimental test artifact API, task support in MatchState, OpenTelemetry tracing, and a new file‑system cache.
v4.0.108 fixesVitest v4.0.10 includes several bug fixes across core, browser, Bun, pool, reporters, and UI components, improving stability and accuracy of test runs.
v4.0.94 fixes1 featureThis release introduces experimental Set support for `toBeOneOf` and includes several UI and jsdom bug fixes, with no breaking changes.
v4.0.89 fixesVitest v4.0.8 includes a series of bug fixes covering Vite config merging, missing type definitions, error messages, CSP header cleanup, Windows Defender handling, annotation encoding, spy static property copying, and WebdriverIO click behavior.
v4.0.78 fixes7 featuresVitest v4.0.7 includes several bug fixes, adds new matcher support and jsdom capabilities, and deprecates the `browser.isolate` and `browser.fileParallelism` options.
v4.0.69 fixesVitest v4.0.6 includes several bug fixes across core, browser, coverage, happy-dom, and jsdom environments.
v4.0.55 fixes2 featuresThis release (v4.0.5) includes several bug fixes, performance improvements, and a minor API rename from `groupId` to `groupOrder`.
v4.0.47 fixesVitest v4.0.4 includes several bug fixes across browser, mocker, pool, spy, and worker modules, plus a performance optimization in utils.
v4.0.34 fixesVitest v4.0.3 includes several bug fixes such as preserving reporter options, improving browser in-source testing stability, adding fetch support to happy-dom, and correcting JSX/TSX extensions in init.
v4.0.24 fixesVitest v4.0.2 includes several bug fixes addressing deprecation notice output, environment variable handling, and spy behavior.
v4.0.12 fixesVitest v4.0.1 resolves two bugs: it relocates the getBuiltins check and corrects pool communication channel teardown timing.
v4.0.0Breaking15 featuresVitest 4.0 introduces a new module‑runner, a tree reporter, and many breaking changes that remove deprecated APIs and drop Vite 5 support. Upgrade by switching to ViteUserConfig, updating reporters, and adjusting configuration options as outlined in the migration guide.
v4.0.0-beta.19Breaking7 fixesVitest v4.0.0-beta.19 removes the tinypool dependency and includes several bug fixes across browser, coverage, and module‑runner areas.
v4.0.0-beta.183 fixes5 featuresVitest v4.0.0-beta.18 introduces new expect.assert narrowing, github-options annotations, schema matchers, content dumping, and custom screenshot comparison, while fixing exports for Playwright CDP, browser utils, and adding AbortSignal support in jsdom.
v4.0.0-beta.171 fixThis beta release fixes a browser import issue allowing BrowserCommand to be imported even when the browser package is not installed.
v4.0.0-beta.163 fixes1 featureThis release introduces type-safe extra context hooks for TestAPI and includes several bug fixes such as updated @types/node peer deps, removal of a deprecated context import in the browser build, and allowing defineConfig to return a promise.
v4.0.0-beta.15No significant changes in this release.
v4.0.0-beta.14Breaking2 fixesThis beta release separates browser mode providers into their own packages and includes fixes for test option inheritance and browser command definitions.
v4.0.0-beta.131 fix2 featuresThis beta release adds `options` exposure on BrowserProviderOption and a `--inspect` flag for webdriverio, and fixes screenshot directory creation.
v4.0.0-beta.12Breaking6 fixes2 featuresVitest v4.0.0-beta.12 adds a new getSeed API, Playwright tracing support, drops Node 18, and removes the deprecated order argument from test(), requiring code updates.
v4.0.0-beta.11Breaking9 fixes2 featuresVitest v4.0.0‑beta.11 adds a new tree reporter, includes shadow‑root content in snapshots, updates the expect API, tightens project config discovery, and brings several UI enhancements and bug fixes.
v4.0.0-beta.10Breaking6 fixes4 featuresVitest v4.0.0-beta.10 adds a new provider‑factory requirement for browsers, introduces several new API features like `relativeModuleId` and locator length support, and includes multiple bug fixes and performance improvements.
v4.0.0-beta.9Breaking4 fixes1 featureVitest v4.0.0‑beta.9 introduces the `getGlobalTestNamePattern` API, fixes several browser and coverage issues, and removes the `minWorkers` config, requiring a small migration step.
v4.0.0-beta.8Breaking1 featureVitest v4.0.0-beta.8 removes deprecated APIs and introduces `enableCoverage`/`disableCoverage` methods for coverage control.
v4.0.0-beta.72 fixes3 featuresThis release adds new experimental API functions, a Vitest watcher, and a browser option for tracking unhandled errors, plus fixes related to error stacks and jsdom globals.
v4.0.0-beta.6Breaking4 fixesVitest v4.0.0-beta.6 introduces a rewritten spying system and removes deprecated reporter APIs, along with several bug fixes and dependency updates.
v4.0.0-beta.5Breaking2 fixesThis beta release switches the test runner to module-runner, adds automatic `todo` mode for empty tests, and includes bug fixes for module invalidation and wdio shadow root handling.
v4.0.0-beta.45 fixes2 featuresVitest v4.0.0-beta.4 adds Qwik support to the init CLI and a new `toMatchScreenshot` matcher, while fixing several bugs such as the `--changed` flag for list, RPC timeouts, and proper WebDriverIO driver closure.
v4.0.0-beta.3Breaking13 fixes4 featuresVitest v4.0.0-beta.3 adds spy support for mock objects, new expect utilities, and an automocker entry, while removing the deprecated `workspace` option and changing `--standalone` behavior, plus numerous bug fixes and dependency updates.
v4.0.0-beta.2Breaking2 fixes1 featureVitest v4.0.0-beta.2 removes Vite 5 support and several deprecated APIs, adds an `onUnhandledError` callback, and includes bug fixes for globals overriding and browser test detection.
v4.0.0-beta.1Breaking1 fix1 featureVitest v4.0.0‑beta.1 introduces major breaking changes, removes many deprecated APIs, adds an `onConsoleLog` entity, and includes a small bug fix for Chai typings.
v3.2.413 fixesVitest v3.2.4 delivers a series of bug fixes across multiple areas (CLI, browser, coverage, expect, pool, reporter, runner, UI) and updates non‑major dependencies, with no breaking changes.
v3.2.37 fixes2 featuresVitest v3.2.3 adds browser base‑url handling and UI test‑annotation display, and includes several bug fixes such as rerunning tests on setup changes and restoring the original `expect.any` return type.
v3.2.25 fixes1 featureThis release adds support for rolldown-vite and includes several bug fixes across browser, expect, and reporter modules.
v3.2.13 fixesVitest 3.2.1 is a patch release that fixes the hashing algorithm, corrects the Chai import in expect’s TypeScript definitions, and adds an export for DeeplyAllowMatchers.
v3.2.0Breaking21 fixes14 featuresVitest vX.Y introduces many new features such as `ctx.signal`, custom test name colors, and browser enhancements, while deprecating `workspace` in favor of `projects` and fixing numerous bugs.
v3.2.0-beta.311 fixes3 featuresThis release adds Temporal equality support, upgrades to Vite 7, and introduces a new onWritePath option for the GitHub Actions reporter, along with numerous bug fixes and improvements across browser, cache, coverage, expect, vite-node, and WebDriverIO.
v3.1.41 fixThe v3.1.4 release fixes the browser CLI options handling so they are applied only when a browser is configured.
v3.2.0-beta.212 fixes4 featuresThis release adds explicit resource management for mocked functions, new sequence ordering and browser options, and includes numerous bug fixes such as switching to picomatch and improving type‑checking behavior.
v3.2.0-beta.11 fix6 featuresVitest 3.2.0‑beta.1 introduces several new APIs such as `ctx.signal`, custom test name colors, `vi.mockObject`, and a `watchTriggerPatterns` option, deprecates `workspace` in favor of `projects`, and adds experimental V8 coverage remapping.
v3.1.38 fixesVitest v3.1.3 introduces a series of bug fixes, including proper import resolution with inline mode, fixture parsing improvements, removal of obsolete event-catcher code, mock resets on retries, ignored writeToCache failures, corrected browser CLI inheritance, updated non‑major dependencies, and enhanced reporter merge output.
v3.1.219 fixesVitest v3.1.2 includes numerous bug fixes across globals, test handling, browser, coverage, runner, UI, and vite-node, along with performance improvements for browser parallelisation.
v3.1.010 fixes13 featuresVitest 3.1.1 adds numerous new features such as `%$` test titles, diff depth control, configurable plugin hooks, and browser locator enhancements, while fixing flakiness, snapshot handling, and reporter ordering issues.
v3.1.12 fixesVersion 3.1.1 patches the reporter module by correcting test order in reports and eliminating duplicate output in verbose mode.
v3.1.0-beta.21 fix3 featuresThis release adds a new configureVitest plugin hook, new browser locators (and, or, filter), and a test.scoped feature for per‑suite fixture overrides, plus a bug fix where --hideSkippedTests now also hides suites.
v3.1.0-beta.16 featuresVitest v3.1.0-beta.1 introduces several new testing options, reporter enhancements, and conditional skipping support.
v3.0.913 fixesThis patch release (v3.0.9) includes a collection of bug fixes across core APIs, browser runner, coverage, vite-node, and web‑worker handling.
v3.0.811 fixesVitest v3.0.8 is a bug‑fix release that resolves cache write issues, switches to browser.isolate, cleans up spy imports, improves argv parsing, updates browser dependencies and source‑map handling, fixes runner cleanup and Task.suite init, enhances snapshot inline usage, and adds Vite 6 buildStart support.
v3.0.75 fixesVitest v3.0.7 delivers several bug fixes—including webdriverio 9 support, updated dependencies, corrected typings for expect.extend, expanded mocker module list, and improved spy reset order—plus a performance improvement for browser context switching.
v3.0.618 fixesVitest v3.0.6 includes numerous bug fixes across core, browser, coverage, dependencies, init, reporters, vite-node, watch, and workspace modules.
v3.0.53 fixes1 featureVitest v3.0.5 adds a UI message for no tests found, includes several bug fixes, and patches a remote code execution vulnerability.
v2.1.92 fixesThis release patches security vulnerabilities CVE-2025-24963 and CVE-2025-24964 and includes bug fixes such as backporting issue #7317 and restricting served files from `/__screenshot-error`.
v1.6.11 fixVitest v1.6.1 includes security patches for CVE-2025-24964 and backports a critical bug fix.
v3.0.47 fixesVitest v3.0.4 includes several bug fixes, updates non‑major dependencies, and security patches for CVE‑2025‑24963.
v3.0.32 fixesVitest v3.0.3 includes bug fixes for browser handling and a performance tweak that updates reporter summaries only when needed.
v3.0.22 fixesVitest v3.0.2 resolves two bugs: it stops awaiting empty timeouts after each test and corrects the TypeScript typings for expect().resolves/rejects chains.
v3.0.12 fixesVitest v3.0.1 primarily rolls back a Vite 6 related fix and bumps non‑major dependencies.
v3.0.0Breaking25 featuresVitest 3 introduces numerous new features, a stable API, and support for Vite 6, while also bringing several breaking changes such as updated spy behavior and stricter error matching that require migration steps.