vitest
5.1.1 · 18 Nov 2026MIT194M / weekRepositoryHomepagenpmAtom feed
5.0.0
major3 Sep 20265.1.1 is the newest release of 5.x.
In short
35 breaking
- Breaking
Replace
loupe.inspectwith pretty-format - Breaking
Remove quotes from string values in
test.for/eachtitle$variable (take 2) - Breaking
Default
attachmentsDirfrom.vitest-attachements/to.vitest/attachments/ - Breaking
Remove
sequentialtest/suite options in favor ofconcurrent - Breaking
Represent locator as an object instead of a string
- Breaking
Inline
expectpackage - Breaking
Remove deprecated entry points
- Breaking
Require Node.js 22 and Vite 6.4
Release note
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
- Breaking
Replace
loupe.inspectwith pretty-format - Breaking
Remove quotes from string values in
test.for/eachtitle$variable (take 2) - Breaking
Default
attachmentsDirfrom.vitest-attachements/to.vitest/attachments/ - Breaking
Remove
sequentialtest/suite options in favor ofconcurrent - Breaking
Represent locator as an object instead of a string
- Breaking
Inline
expectpackage - Breaking
Remove deprecated entry points
- Breaking
Require Node.js 22 and Vite 6.4
- Breaking
Fail
expect.pollwhen function didn't resolve in time - Breaking
Throw an error if hoistable methods are outside the top level scope
- Breaking
toHaveTextContentis strict, addtoMatchTextContentas alternative - Breaking
Don't lookup config file from ancestor directories
- Breaking
Inline
@vitest/runnerpackage, do not publish it anymore - Breaking
Allow mutating happy-dom/jsdom window object
- Breaking
Expose
concurrencyId/workerIdon TestModule's diagnostics, make id 1-based - Breaking
Add
screenshotDirectoryconfig tobrowser.expect.toMatchScreenshot - Breaking
Update
@sinonjs/fake-timersand support mockingTemporal - Breaking
Remove webdriverio package
- Breaking
Clear mocks by default before each test
- Breaking
Don't emit localStorage warnings on Node 26, fail gracefully when worker fails to start
- Breaking
Separate config resolution from the server creation
- Breaking
Inline projects extend the root config by default
- Breaking
Enable mocking Temporal without fake timers
- Breaking
Support nested projects
- Breaking
Use
>as separator in-t, calculateonlyonce - Breaking
Fail the test when an asynchronous assertion is not awaited
- Breaking
Share the Vite server between inline projects
- Breaking
Parse files statically in vitest list by default
- Breaking
benchmark: Rewrite the public API
- Breaking
browser: Iframe scale
- Breaking
browser: Enable
locators.exactby default - Breaking
browser: Require
sessionIdfor orchestrator html request - Breaking
browser: Save failure screenshots in
attachmentsDir - Breaking
coverage:
include/excludeglobs too eager - Breaking
coverage: Allow
thresholds.perFileto accept an object
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.