Repository navigation
Releases: vitest-dev/vitest
Releases · vitest-dev/vitest
Release list
v5.0.5
Immutable
release. Only release title and notes can be modified.
🐞 Bug Fixes
- Keep vite default
fs.denywith api token file - by @hi-ogawa, Hiroshi Ogawa and Claude Opus 5.5 in #11578 (28dc1) - Handle quoted file names in
--changed- by @sheremet-va in #11583 (14921) - Add
datato theimport.meta.hotstub - by @sheremet-va in #11590 (3a828) - Set
skipinskipIf, ignoreundefinedoptions - by @sheremet-va in #11591 (d523a) - Skip builtin loading in async leak detector - by @sheremet-va in #11598 (fe86a)
- Keep the import frame in native loader errors - by @sheremet-va in #11599 (9697b)
- Run hook cleanups when a later hook fails - by @sheremet-va in #11605 (6c5a4)
- Release mocks of finished test files - by @sheremet-va in #11607 (e9c3d)
- Abort all running tests on cancel - by @sheremet-va in #11606 (6621a)
- browser:
- Ignore synthetic pagehide events - by @sheremet-va in #11582 (ca081)
- Run plugin buildStart on server creation - by @sheremet-va in #11593 (ea611)
- Drop late connections of closed sessions - by @sheremet-va in #11600 (f161e)
- Wait 30s for the browser to close - by @sheremet-va in #11601 (6498b)
- Run global setup once with instances - by @sheremet-va in #11596 (8dd67)
- reporter:
- End reason
'failed'on worker crash - by @AriPerkkio in #11568 (6ae8e)
- End reason
View changes on GitHub
v4.1.12
Immutable
release. Only release title and notes can be modified.
🐞 Bug Fixes
- mocker: Harden manual and redirect mocks [backport to v4] - by @sheremet-va in #11580 (b8253)
View changes on GitHub
v5.0.4
Immutable
release. Only release title and notes can be modified.
🚀 Features
- experimental:
- Tag cache directories with CACHEDIR.TAG - by @lifeiscontent in #11461 (a8ea3)
- Support
test.ui.themeoption - by @sheremet-va in #11499 (1da66) - Highlight selector multiple matches in trace view - by @hi-ogawa, Hiroshi Ogawa and Claude Opus 5.5 in #11489 (5abba)
- Print how many tests were affected and a total when running
--changed- by @sheremet-va in #11424 (a2336) - Add an option to cache dependencies instead of statically parsing them - by @sheremet-va in #11515 (c0601)
- Add fit and zoom controls to trace viewer - by @hi-ogawa, Hiroshi Ogawa and Claude Opus 5.5 in #11490 (f5dd9)
🐞 Bug Fixes
- Fail the run on git and location filter errors - by @sheremet-va in #11430 (30d03)
- Enable fsModuleCache by default - by @sheremet-va in #11435 (ad208)
- Track project files and mocks with --changed - by @sheremet-va in #11432 (b0f2b)
- Refactor caching, fix
:in project and change the shape ofresultscache - by @sheremet-va in #11453 (9673c) - Keep full
$string values whentaskTitleValueFormatTruncateis 0 - by @hi-ogawa, Hiroshi Ogawa and Claude Opus 5.5 in #11485 (4f7e1) - Resolve node builtins in client environments - by @sheremet-va in #11417 (56b31)
- Fix module graph builtin externals after #11421 - by @hi-ogawa, Hiroshi Ogawa and Claude Opus 5.5 in #11491 and #11421 (008e1)
- Wrap module mocks during in-source testing - by @sheremet-va in #11505 (36d19)
- Handle line endings in snapshot - by @sheremet-va in #11522 (4c468)
- Respect root in projects - by @sheremet-va in #11521 (26642)
- Resolve mocks in directories with spaces - by @sheremet-va in #11539 (caaef)
- api:
- Publish the api token atomically - by @umairnawaz333 in #11323 (6f990)
- browser:
- Close the mock route interception race - by @cplieger and @sheremet-va in #8339 and #11083 (d6620)
- Allow toHaveTextContent without arguments - by @nomadical in #11425 (8ebcf)
- Apply API options without browser config - by @sheremet-va in #10852 (ad055)
- Preserve undefined command arguments - by @sheremet-va and @AriPerkkio in #11497 (1576d)
- Wait for setup mocks before importing a test file - by @kasperpeulen in #11520 (b61d1)
- Avoid extra scroll outside the iframe - by @sheremet-va in #11523 (662e8)
- Run browser instances as workers - by @sheremet-va in #11525 (bf04b)
⚠️ This can degrade performance if you have a custommaxWorkerssetting. 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.
- Open one cdp session per tester - by @sheremet-va in #11542 (69e63)
- Clean up unmocked and pending mocks - by @sheremet-va in #11537 (5c955)
- coverage:
- V8 browser memory leak between test files - by @AriPerkkio in #11466 (2297d)
allowExternalfails to include uncovered files - by @AriPerkkio in #11513 (4ef00)- Filenames containing brackets incorrectly showing as uncovered - by @AriPerkkio in #11531 (0fa80)
- Istanbul coverage wrong when module transform warmups - by @AriPerkkio in #11529 (9f61d)
- deps:
- Update all non-major dependencies - by @sheremet-va in #11167 (c74e0)
- expect:
- mocker:
- Fix native loader mocking edge cases - by @sheremet-va in #11540 (cd423)
- pretty-format:
- reporters:
- Junit to strip ANSI sequences from all XML attributes - by @meganemura and Claude Opus 5.5 in #11407 (e1a73)
- runner:
- Don't cache failed fixture setups - by @hamed-bavar in #11237 and #11238 (4ee66)
- typecheck:
- Use typescript pool in toTestSpecification - by @sheremet-va in #11451 (5f273)
- ui:
- Remove duplicate browser-open call opening two tabs - by @feastyr69 in #11356 and #11358 (d7e13)
- Simplify explorer filtering + fix nested tests when search matches a suite - by @hi-ogawa, Hiroshi Ogawa, Codex and Claude Opus 5.5 in #11262 (a627b)
- Store module graph once per environment - by @hi-ogawa, Hiroshi Ogawa and Claude Opus 5.5 in #11421 [(af903)](af903c65e...
v5.0.3
Immutable
release. Only release title and notes can be modified.
🐞 Bug Fixes
- Isolate
result.statusbetweenrepeatsruns - by @hi-ogawa, Hiroshi Ogawa and Codex (GPT-6) in #11218 (5dbeb) - Don't print an interceptor warning in browser mode - by @sheremet-va in #11377 (15cc0)
- Don't retry when
test.failsexpectedly failed - by @hi-ogawa, Hiroshi Ogawa and Codex (GPT-6) in #11219 (b2458) - Scope cache key generators to projects - by @ecoyoung in #11281 and #11301 (92ba7)
- browser:
- Delay server
listenuntil tests start running - by @sheremet-va in #11366 (7d8ed) - Check mock path boundaries - by @saryn17, Ryosei Sato and @sheremet-va in #11361 and #11362 (1c388)
- Keep config of browser-consumed environments - by @kasperpeulen and Claude in #11378 (aafc0)
- Ignore page crash while cancelling - by @sheremet-va in #11386 (7c367)
toMatchScreenshotuses wrong reference on retried tests - by @macarie in #11393 (c22ab)
- Delay server
- cache:
- Revalidate imports of cached modules - by @sheremet-va in #11381 (38f98)
- deps:
- Pin
why-is-node-runningto3.2.1to avoid users running intoERR_PNPM_TRUST_DOWNGRADE- by @AriPerkkio in #11403 (f6c9a)
- Pin
- expect:
- jsdom:
- Support Blob on jsdom 30.1 - by @sheremet-va in #11379 (6c49b)
- pool:
- ui:
- vitest:
- Remove root temp dir on close - by @abhinav-phi in #11248 (7c711)
- vm:
View changes on GitHub
v5.0.2
Immutable
release. Only release title and notes can be modified.
🐞 Bug Fixes
- Bind
processin case global is overwritten - by @AriPerkkio in #11343 (0b792) - detect-async-leaks:
- Ignore
process.stdiohandles - by @AriPerkkio in #11333 (0fd6b)
- Ignore
- expect:
- Fix
toMatchObjectwith asymmetric matchers - by @ShreeBohara, Claude Opus 5, @hi-ogawa, Hiroshi Ogawa and Codex (GPT-5) in #11100 (42523)
- Fix
- jsdom:
- Fix
RequestwithBlobbody on jsdom 28+ - by @harshit-d3v in #11295 (d1c3e)
- Fix
- reporter:
agentto respect--silent- by @Raj4478 and @AriPerkkio in #11271 (5b95e)
- reporters:
- spy:
- ui:
View changes on GitHub
v5.0.1
Immutable
release. Only release title and notes can be modified.
🚀 Features
- ui:
🐞 Bug Fixes
- Exit 1 when vitest list fails collection - by @hamed-bavar in #11145 and #11146 (6108b)
- Keep parse error details in static collection - by @hamed-bavar in #11150 and #11151 (7c818)
- Avoid recursive prototype in automocking - by @sheremet-va in #11195 (99fc5)
- Prevent false Vitest import resolution - by @sheremet-va in #11196 (b426c)
- Keep metadata file when clearing the cache - by @sheremet-va in #11199 (73614)
- Correct typos in error message and comments - by @shinji00222 and Shinji in #11187 (115c3)
- Resolve ResolvedConfig exactOptionalPropertyTypes errors - by @LukeAbby in #11175 (498fb)
- Share the server on self-referencing
extends- by @sheremet-va in #11034 (23dda) - Warn when deprecated
deps.optimizer.webis used - by @im10furry in #11214 (2ce29) - browser:
- Avoid double quotes in
config.define- by @sheremet-va in #11198 (972e2)
- Avoid double quotes in
- doctor:
- Measure vm pools for custom environments - by @sheremet-va in #11212 (91ab1)
- expect:
- Correct return value in
toMatchAriaSnapshot- by @sheremet-va in #11208 (c119b)
- Correct return value in
- fakeTimers:
- Force
queueMicrotaskandnextTickintoNotFake- by @kingmakeruix, kingmakeruix, Hiroshi Ogawa, Codex and @hi-ogawa in #11261 (a47d7)
- Force
- snapshot:
- Report obsolete keys next to skipped tests - by @hamed-bavar, Hiroshi Ogawa and OpenCode (gpt-5.6-sol) in #11157 and #11158 (17e2b)
- types:
- Make public declarations self-contained - by @ZoeySigel in #11141 (45546)
- ui:
- utils:
View changes on GitHub
v5.0.0
Immutable
release. Only release title and notes can be modified.
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.inspectwith pretty-format - by @hi-ogawa, Claude Opus 5 (1M context) and OpenAI Codex in #9609 (3f802) - Remove quotes from string values in
test.for/eachtitle$variable (take 2) - by @hi-ogawa in #10170 (04d37) - Default
attachmentsDirfrom.vitest-attachements/to.vitest/attachments/- by @MdSadiqMd in #10186 (1ba73) - Remove
sequentialtest/suite options in favor ofconcurrent- by @hi-ogawa and OpenAI Codex in #10198 (9229f) - Represent locator as an object instead of a string - by @sheremet-va in #10212 (80f07)
- Inline
expectpackage - by @sheremet-va in #10221 (ad162) - Remove deprecated entry points - by @sheremet-va in #10222 (994c6)
- Require Node.js 22 and Vite 6.4 - by @sheremet-va in #10178 (38762)
- Fail
expect.pollwhen function didn't resolve in time - by @hi-ogawa and OpenAI Codex in #10233 (4df04) - Throw an error if hoistable methods are outside the top level scope - by @sheremet-va in #10460 (d0b4f)
toHaveTextContentis strict, addtoMatchTextContentas alternative - by @sheremet-va in #10473 (18f30)- Don't lookup config file from ancestor directories - by @hi-ogawa, OpenAI Codex and Hiroshi Ogawa in #10428 (945d9)
- Inline
@vitest/runnerpackage, do not publish it anymore - by @sheremet-va in #10511 (6d6e4) - Allow mutating happy-dom/jsdom window object - by @hi-ogawa, Hiroshi Ogawa and OpenAI Codex in #10373 (206e8)
- Expose
concurrencyId/workerIdon TestModule's diagnostics, make id 1-based - by @sheremet-va in #10516 (bdd98) - Add
screenshotDirectoryconfig tobrowser.expect.toMatchScreenshot- by @macarie in #10592 (a60de) - Update
@sinonjs/fake-timersand support mockingTemporal- by @hi-ogawa, Hiroshi Ogawa and OpenCode (gpt-5.6-sol) in #10654 (f8b15) - Remove webdriverio package - by @sheremet-va in #10675 (5fed6)
- Clear mocks by default before each test - by @sheremet-va in #10613 (0f646)
- Don't emit localStorage warnings on Node 26, fail gracefully when worker fails to start - by @sheremet-va in #10293 (334ed)
- Separate config resolution from the server creation - by @sheremet-va in #10554 (1c0ec)
- Inline projects extend the root config by default - by @sheremet-va in #10750 (fec00)
- Enable mocking Temporal without fake timers - by @fabon-f, Hiroshi Ogawa and OpenCode (gpt-5.6-sol) in #10757 (ac2d4)
- Support nested projects - by @sheremet-va in #10846 (ec367)
- Use
>as separator in-t, calculateonlyonce - by @sheremet-va in #10686 (a0b20) - Fail the test when an asynchronous assertion is not awaited - by @sheremet-va in #10868 (86d4a)
- Share the Vite server between inline projects - by @sheremet-va in #10848 (d87c9)
- Parse files statically in vitest list by default - by @sheremet-va in #11088 (51e94)
- benchmark:
- Rewrite the public API - by @sheremet-va in #10113 (19f6e)
- browser:
- Iframe scale - by @macarie in #9745 (b6398)
- Enable
locators.exactby default - by @sheremet-va in #10430 (e2032) - Require
sessionIdfor orchestrator html request - by @hi-ogawa, Hiroshi Ogawa and OpenAI Codex in #10522 (79b7d) - Save failure screenshots in
attachmentsDir- by @macarie in #10917 (3b5bb)
- coverage:
include/excludeglobs too eager - by @AriPerkkio in #9818 (edacb)- Allow
thresholds.perFileto accept an object - by @vladlenskiy and @AriPerkkio in #10190 (13b78)
- expect:
- mocker:
- reporters:
blobreporter and--merge-reportsdefault to.vitest/blob/- by @AriPerkkio in #10232 (d22b0)- Write json and junit reporter output files to
.vitestby default - by @hi-ogawa, Hiroshi Ogawa, OpenCode (gpt-5.6-sol) and @AriPerkkio in #10621 (58577)
- spy:
- Preserve class mock prototype methods on instances - by @sheremet-va in #10910 (6093d)
- types:
- Add better promise support in expects and matchers - by @samchungy and @sheremet-va in #8266 (41f55)
- ui:
v5.0.0-rc.4
Immutable
release. Only release title and notes can be modified.
🚨 Breaking Changes
- Parse files statically in vitest list by default - by @sheremet-va in #11088 (51e94)
🚀 Features
- Promote clearCache out of experimental - by @sheremet-va in #11086 (d4fe1)
- ui: Add link to open playwright trace - by @hi-ogawa, Hiroshi Ogawa and OpenCode (gpt-5.6-sol) in #11059 (58f02)
🐞 Bug Fixes
- Don't duplicte
oxc.targetif user provides a custom array - by @sheremet-va in #11095 (848d7) - Propagate --maxWorkers to projects - by @Gaurav1112 in #11102 (2122f)
- browser: Report the action error when a task times out - by @sheremet-va in #11101 (dc10f)
- ui: Add suite level report view - by @dvmhmdsd, Hiroshi Ogawa, OpenCode (gpt-5.6-sol) and @hi-ogawa in #11038 (602d2)
- vm: Link module graphs one at a time - by @sheremet-va in #11096 (3f2dd)
🏎 Performance
View changes on GitHub
v5.0.0-rc.3
Immutable
release. Only release title and notes can be modified.
🚀 Features
- Promote parseSpecifications out of experimental - by @sheremet-va in #11087 (b628c)
- coverage:
- Switch to
@vitest/istanbuljspackages - by @AriPerkkio in #11053 (5f6a5)
- Switch to
- ui:
- Highlight editor source locations - by @sheremet-va, Hiroshi Ogawa and OpenCode in #11004 (bce2d)
- Navigate trace steps with keyboard and remove indirect editor focus - by @sheremet-va, Hiroshi Ogawa and OpenCode in #11005 (6816f)
- Persist trace view selection in URL - by @hi-ogawa, Hiroshi Ogawa and OpenCode in #10981 (3069e)
- Toggle trace target highlight - by @hi-ogawa, Hiroshi Ogawa and OpenCode in #11049 (cd63e)
🐞 Bug Fixes
- Combine multiple --project filters correctly - by @sheremet-va in #10988 (66c1c)
- Fix
recordArtifactlocation withvi.defineHelper- by @hi-ogawa, Hiroshi Ogawa and OpenCode in #11047 (c2186) - Invalidate resolved setup files - by @sheremet-va in #11073 and #11081 (488c0)
- Accept awaited value in vi.when thenResolve - by @sheremet-va in #11084 (c10a1)
- Ignore computed member calls in static collection - by @sheremet-va in #11085 (130f7)
- browser:
- Don't hang when
ui: truein projects - by @AriPerkkio in #10994 (9f710) - Preserve trace popover state - by @liuluochen6-af, Hiroshi Ogawa, OpenCode and @hi-ogawa in #10906 and #11021 (1bbc2)
- Don't hang when
- coverage:
- V8 to ignore Vite SSR's generated import bindings - by @AriPerkkio in #11023 (c6174)
- deps:
- snapshot:
- Reject when
toMatchFileSnapshotuses same snapshot file astoMatchSnapshot- by @hi-ogawa, Hiroshi Ogawa, OpenCode and @sheremet-va in #10978 (17646)
- Reject when
- ui:
- Improve suite interaction and layout in explorer tree - by @hi-ogawa, Hiroshi Ogawa and OpenCode in #10970 (91231)
- Reveal explorer virtual scroller on resize - by @hi-ogawa, Hiroshi Ogawa and OpenCode in #10998 (1f4fc)
- Persist trace step-iframe split pane sizes - by @hi-ogawa, Hiroshi Ogawa and OpenCode in #11027 (3cd01)
- vm:
- Fall back to compiling from source when a module's code cache is rejected - by @MarshallOfSound in #11031 (c3ba1)
- worker:
- Bind stdio's early in case overriden - by @AriPerkkio in #11020 (67ef7)
🏎 Performance
- Initialize trace view in the orchestrator once per worker - by @sheremet-va in #10984 (fad26)
- cache:
- Hash the environment-invariant part of the fs module cache key once - by @MarshallOfSound in #11029 (1d365)
- expect:
- vm:
- Don't prewarm modules the worker never requests - by @MarshallOfSound and @sheremet-va in #11033 (1e9f8)
- Let environments opt out of the module graph prewarm - by @sheremet-va in #11078 (a6d5e)
View changes on GitHub
v4.1.11
Immutable
release. Only release title and notes can be modified.
🐞 Bug Fixes
- Revive global concurrency limit for test lifecycle [backport to v4] - by @sheremet-va and @hi-ogawa in #10992 (5146d)
- browser:
- mocker:
- Restrict redirect mocks to the fs allowlist [backport to v4] - by @sheremet-va in #10974 (fe5a1)