@vitest/expect
5.1.0 · 2 Nov 2026MIT158.3M / weekRepositoryHomepagenpmAtom feed
Where each line stands
Plan an upgradeLatest releases
All 140 releases- 5.x · latest line
5.1.1
18 Nov 2026Rerun on file changes after a config restart
Avoid leaking the context expect
Report fixture teardown errors once
Bug Fixes
Rerun on file changes after a config restart
Avoid leaking the context expect
Report fixture teardown errors once
Improve diffs for asymmetric matchers
Apply --shard before the test run starts
Reset local expect state between retries for
expect.assertions/hasAssertionsSort test files before the seeded shuffle
Tear down fixture contexts one at a time
Count merged errors in the error divider
Match
-and.innoExternalwildcardsGive each test attempt a new
signalThrow timeout error classes instead of Error
browser: Scale the iframe for preview without the UI
browser: Fix expect.element with
messageand remove redundant[ERROR]in trace stepscache: Always leave a manifest to the fs module cache
cache: Watch cached files outside the root
cache: Treat a removed cache file as a miss
cache: Allow cache hits in configureServer
Performance
Send source maps to workers as a string
Resolve CLI file filters once instead of per test file
5.1.0
2 Nov 2026Add
--last-failedto run only failed testsSupport
Temporal.InstantandTemporal.ZonedDateTimeinvi.setSystemTime()Introduce
--since-last-runflag
Features
Add
--last-failedto run only failed testsSupport
Temporal.InstantandTemporal.ZonedDateTimeinvi.setSystemTime()Introduce
--since-last-runflagExpose per-retry/repeat attempt result
Support fake timers for
node:timersandnode:timers/promiseAllow coverage providers to store data in fs module cache
Interactively review failed snapshots
browser: Mock modules through an import map
browser: Drop experimental label from trace view
browser: Introduce experimental
pointerAPIbrowser: Capture aria snapshot in trace view
browser: Show trace steps timeline on terminal on test failure
browser: Add failure-only trace view mode
browser: Enable failure-only trace view by default
coverage: V8 to support
ignoreNodeoptionexperimental: Add trace timeline for node
experimental: Add message option to vi.waitFor and vi.waitUntil
Bug Fixes
Rerun setup files after
--changedfilteringReturn the mock to concurrent imports
Don't fail on console log pending at teardown
Reference chai types in every d.ts chunk
Detect mock factory cycles that form later
Skip fs module cache for typed import.meta.glob
Run tests that import a deleted file
Keep syntax highlighting in code frames
Respect CLI filters when prewarming browsers
Read cached source as utf-8
Inherit
watchfrom the root config in projectsPrefix expect.poll message to all errors
Support api.port 0
Show attempts in test error logs of retried tests
Preserve rootDir in project paths
browser: Change default port to 23315
browser: Advance fake timers in actions and expect.element
browser: Drop trace view warning without html reporter
browser: Detect shared chunks via the optimizer
browser: Clear screenshot stability timeout
browser: Measure prepare duration with one clock
browser: Keep failure screenshot per attempt
browser: Print trace timeline of each attempt
browser: Don't hang in
page.viewport()browser: Skip trace entries after their attempt ended
browser: Focus the iframe before clicking in playwright
browser: Fail the run when a tester cannot connect
browser: Treat edge as chromium in toHaveStyle
cache: Handle concurrent cache clearing
cache: Key module cache on the deps optimizer
cache: Do not fail when the cache dir is unwritable
cli: Use camelCase for sinceLastRun help
coverage: V8
autoAttachSubprocessto use.tmpdirectorycoverage: V8 to ignore Vite's generated CJS namespace import helper
deps: Update all non-major dependencies
expect: Keep soft .resolves/.rejects error location
mocker: Don't change the original prototype chain
mocker: Use root mocks for linked packages
runner: Don't drop throttled task updates
ui: Escape search text in explorer highlight
ui: Fix html reporter crash when --bail cancels files
ui: Fix quirks mode in trace view replay
ui: Let coverage report follow UI color scheme
ui: Open trace view only for tests with a trace
vm: Strip hashbang before compiling CommonJS dependencies
vm: Keep node globals after teardown
vm: Reset fake timers after each test file
vm: Keep assignable accessor globals writable in node environment
Performance
Reuse fsModuleCache in static collection
Cache setup/mock resolves in reused workers
Don't refetch warm modules in reused runners
browser: Map only first frame for trace locations
browser: Disable WebSocketServer's allowSynchronousEvents
coverage: Istanbul to use
magic-string+rolldownfor instrumentationcoverage: Istanbul to collect uncovered files in
Promise.allcoverage: Istanbul to not store input source maps in coverage data
expect: Compare typed arrays in one loop
5.0.5
15 Oct 2026Keep vite default
fs.denywith api token fileHandle quoted file names in
--changedAdd
datato theimport.meta.hotstub
Bug Fixes
Keep vite default
fs.denywith api token fileHandle quoted file names in
--changedAdd
datato theimport.meta.hotstubSet
skipinskipIf, ignoreundefinedoptionsSkip builtin loading in async leak detector
Keep the import frame in native loader errors
Run hook cleanups when a later hook fails
Release mocks of finished test files
Abort all running tests on cancel
browser: Ignore synthetic pagehide events
browser: Run plugin buildStart on server creation
browser: Drop late connections of closed sessions
browser: Wait 30s for the browser to close
browser: Run global setup once with instances
reporter: End reason
'failed'on worker crash
Dependency tracking
Know when your own dependencies move
@vitest/expect shipped a new major in the last 12 months, among 32 releases. inlinr shows which of your projects are behind, and what the upgrade breaks.
Advisories reach you
An email when a critical or high advisory affects a project, before the next install.
Upgrades checked first
Peer ranges, Node, ESM-only and types changes read before you bump.
Only what matters
Majors and breaking notes stay; patches and sibling bumps fold into one line.
Registry facts last checked 16 Nov 2026. Releases and advisories last read 19 Nov 2026.