Packages

vitest

5.1.1 · 18 Nov 2026MIT194M / weekRepositoryHomepagenpmAtom feed

Your version

5.0.4

12 Oct 2026

5.1.1 is the newest release of 5.x.

In short

6 new29 fixed

Release note

Features

  • experimental: Tag cache directories with CACHEDIR.TAG

  • experimental: Support test.ui.theme option

  • experimental: Highlight selector multiple matches in trace view

  • experimental: Print how many tests were affected and a total when running --changed

  • experimental: Add an option to cache dependencies instead of statically parsing them

  • experimental: Add fit and zoom controls to trace viewer

Bug Fixes

  • Fail the run on git and location filter errors

  • Enable fsModuleCache by default

  • Track project files and mocks with --changed

  • Refactor caching, fix : in project and change the shape of results cache

  • Keep full $ string values when taskTitleValueFormatTruncate is 0

  • Resolve node builtins in client environments

  • Fix module graph builtin externals after #11421

  • Wrap module mocks during in-source testing

  • Handle line endings in snapshot

  • Respect root in projects

  • Resolve mocks in directories with spaces

  • api: Publish the api token atomically

  • browser: Close the mock route interception race

  • browser: Allow toHaveTextContent without arguments

  • browser: Apply API options without browser config

  • browser: Preserve undefined command arguments

  • browser: Wait for setup mocks before importing a test file

  • browser: Avoid extra scroll outside the iframe

  • browser: Run browser instances as workers

    • ⚠️ This can degrade performance if you have a custom maxWorkers setting. Previously, it was applied incorrectly and could lead to Vitest using too many resources. For example, a lower number would still open too many browsers. Fixing it means Vitest opens less instances by default now.

  • browser: Open one cdp session per tester

  • browser: Clean up unmocked and pending mocks

  • coverage: V8 browser memory leak between test files

  • coverage: allowExternal fails to include uncovered files

  • coverage: Filenames containing brackets incorrectly showing as uncovered

  • coverage: Istanbul coverage wrong when module transform warmups

  • deps: Update all non-major dependencies

  • expect: Fix Map and Set deep equality in some assertions

  • expect: Check value in chai-style returned

  • mocker: Fix native loader mocking edge case

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.