Releases: vitest-dev/vitest
Releases · vitest-dev/vitest
v5.0.0-beta.3
Immutable
release. Only release title and notes can be modified.
🚨 Breaking Changes
- 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 Codex in #10233 (4df04)
🚀 Features
- Support typescript build mode - by @lishaduck in #9870 (106da)
- api:
- Expose logs recorded during the test - by @sheremet-va in #10277 (cba20)
- browser:
- Show aria tree on locator element error - by @hi-ogawa and Codex in #10257 (04f04)
- Support custom
kindinpage.mark- by @AriPerkkio in #10302 (053e8) - Live update trace view on watch UI - by @hi-ogawa and Codex in #10296 (78c11)
- Add
context.markfor custom command tracing - by @AriPerkkio in #10329 (aa514)
🐞 Bug Fixes
- Shell injection safety via github.ref_name in publish workflow - by @lloyd-c137 and lloyd-c137 in #10327 (dd020)
- Make
attachmentsDirroot only config - by @hi-ogawa and Codex in #10334 (fab1b) - Apply cjs interop for truthy
__esModule- by @hi-ogawa in #10363 (2b135) - browser:
- cli:
- coverage:
excludeto not inherit negation globs fromtest.include- by @AriPerkkio in #10299 (28685)
- deps:
- expect:
- junit:
- reporter:
- Guard against non-finite slowTestThreshold in summary reporter - by @OfekDanny, Ofek Danny, Claude Sonnet 4.6 and @AriPerkkio in #10202 (f362f)
- Fix non-existing import subpath module blob serialization - by @hi-ogawa in #10318 (29cb0)
- reporters:
- Fix blob file name with label - by @hi-ogawa in #10346 (c5e2e)
summaryto intercept logger's streams even when they are notprocess.std*streams - by @AriPerkkio in #10340 (f79e7)- Fix missing
testModulesinonTestRunEndwhen merging blobs from different root directory test runs - by @hi-ogawa and Codex in #10348 (745b3)
- runner:
- Remove AbortSignal listener leak in withCancel - by @tomohiro86 and @AriPerkkio in #10265 (ab098)
- ui:
🏎 Performance
- Stringify diff objects only once - by @sheremet-va in #10276 (d006a)
- browser: Reduce matching screenshot overhead - by @kasperpeulen in #10278 (511c0)
View changes on GitHub
v4.1.7
Immutable
release. Only release title and notes can be modified.
v4.1.6
Immutable
release. Only release title and notes can be modified.
🐞 Bug Fixes
- browser: Provide project reference in
ToMatchScreenshotResolvePath- by @macarie and @sheremet-va in #10138 (31882) - Global
sequence.concurrent: truewith top-leveltest(..., { concurrent: false })+ depreactesequentialtest API and options - by @hi-ogawa, Codex and @sheremet-va in #10196 (2847d) - browser: Simplify orchestrator otel carrier - by @hi-ogawa in #10285 (18af9)
🏎 Performance
- Stringify diff objects only once - by @sheremet-va in #10276 (9f7b1)
View changes on GitHub
v5.0.0-beta.2
Immutable
release. Only release title and notes can be modified.
🚨 Breaking Changes
- Default
attachmentsDirfrom.vitest-attachements/to.vitest/attachments/- by @MdSadiqMd in #10186 (1ba73) - Remove
sequentialtest/suite options in favor ofconcurrent- by @hi-ogawa and 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)
- mocker: Deserialize automock as automock - by @nami8824 in #10192 (2f892)
- reporters:
blobreporter and--merge-reportsdefault to.vitest/blob/- by @AriPerkkio in #10232 (d22b0)
🚀 Features
- Expose default reporters through
configDefaults.reporters- by @hi-ogawa and Claude Sonnet 4.6 in #10219 (083f6) - Support merge reports for non-sharded multi-environment runs (take 2) - by @hi-ogawa, Claude Sonnet 4.6, Codex and @AriPerkkio in #10031 (e60b2)
- Add
logger.formatError- by @hi-ogawa and Codex in #10268 (2c5f3) - browser: Provide project reference in
ToMatchScreenshotResolvePath- by @macarie and @sheremet-va in #10138 (16654) - coverage: V8 to track
node:child_processandnode:worker_threadscontexts - by @AriPerkkio in #9976 (9baa5) - junit-reporter: Add jest-junit-compatible naming options - by @neumaennl, neumaennl, @neumann4soft and Copilot in #10189 (27393)
🐞 Bug Fixes
- Global
sequence.concurrent: truewith top-leveltest(..., { concurrent: false })+ depreactesequentialtest API and options - by @hi-ogawa, Codex and @sheremet-va in #10194 (9387f) - Test
tagsoptions should overwrite inherited suite options + inherit suite options intaskAPI - by @hi-ogawa and Codex in #10216 (457db) - Udpate optimize deps config - by @sheremet-va in #10223 (95dc6)
- browser:
- deps:
- runner:
- snapshot:
- spy:
- Support private method spy types - by @cyphercodes in #10172 and #10213 (628ab)
View changes on GitHub
v5.0.0-beta.1
🚨 Breaking Changes
- Replace
loupe.inspectwith pretty-format - by @hi-ogawa, Claude Sonnet 4.6 and Codex in #9609 (3f802) - Remove quotes from string values in
test.for/eachtitle$variable (take 2) - by @hi-ogawa in #10170 (04d37) - browser: Iframe scale - by @macarie in #9745 (b6398)
- coverage:
include/excludeglobs too eager - by @AriPerkkio in #9818 (edacb) - expect: Fix
toThrow("")behavior by reverting #6710 - by @hi-ogawa in #9643 and #6710 (6c3e4)
🚀 Features
- Add
createReportand.vitestreport directory convention - by @AriPerkkio in #9993 (72a6d) - browser:
🐞 Bug Fixes
- snapshot: Fail test when snapshot assertion is used with
test.fails- by @hi-ogawa in #10090 (e1aa7)
View changes on GitHub
v4.1.5
🚀 Experimental Features
- coverage: Istanbul to support
instrumenteroption - by @BartWaardenburg and @AriPerkkio in #10119 (0e0ff)
🐞 Bug Fixes
- --project negation excludes browser instances - by @felamaslen in #10131 (9423d)
- Project color label on html reporter - by @hi-ogawa in #10142 (596f7)
- Fix
vi.defineHelpercalled as object method - by @hi-ogawa in #10163 (122c2) - Alias
agentreporter tominimal- by @sheremet-va in #10157 (663b9) - Respect diff config options in soft assertions - by @Copilot, sheremet-va and @sheremet-va in #8696 (9787d)
- Respect diff config options in soft assertions " - by @sheremet-va in #8696 (7dc6d)
- ast-collect: Recognize _vi_import prefix in static test discovery - by @Yejneshwar in #10129 (32546)
- coverage: Descriptive error message when reports directory is removed during test run - by @DaveT1991 and @AriPerkkio in #10117 (14133)
- snapshot: Increase default snapshot max output length - by @hi-ogawa and Codex in #10150 (21e66)
- ui: Fix jsx/tsx syntax highlight - by @hi-ogawa in #10152 (f1b1f)
- web-worker: Support MessagePort objects referenced inside postMessage data - by @whitphx and Claude Opus 4.6 (1M context) in #9927 and #10124 (7ad7d)
- api: Make test-specification options writable - by @sheremet-va in #10154 (6abd5)
View changes on GitHub
v4.1.4
🚀 Experimental Features
- coverage:
- experimental:
- Expose
assertionas a public field - by @sheremet-va in #10095 (a120e) - Support aria snapshot - by @hi-ogawa, Claude Opus 4.6 (1M context), @AriPerkkio, Codex and @sheremet-va in #9668 (d4fbb)
- Expose
- reporter:
- Add filterMeta option to json reporter - by @nami8824 and @sheremet-va in #10078 (b77de)
🐞 Bug Fixes
- Use "black" foreground for labeled terminal message to ensure contrast - by @hi-ogawa in #10076 (203f0)
- Make
expect(..., message)consistent as error message prefix - by @hi-ogawa and Codex in #10068 (a1b5f) - Do not hoist imports whose names match class properties . - by @SunsetFi in #10093 and #10094 (0fc4b)
- browser: Spread user server options into browser Vite server in project - by @GoldStrikeArch in #10049 (65c9d)
View changes on GitHub
v4.1.3
🚀 Experimental Features
- Add
experimental.preParseflag - by @sheremet-va in #10070 (78273) - Support
browser.locators.exactoption - by @sheremet-va in #10013 (48799) - Add
TestAttachment.bodyEncoding- by @hi-ogawa in #9969 (89ca0) - Support custom snapshot matcher - by @hi-ogawa, Claude Sonnet 4.6 and Codex in #9973 (59b0e)
🐞 Bug Fixes
- Advance fake timers with
expect.pollinterval - by @hi-ogawa and Claude Sonnet 4.6 in #10022 (3f5bf) - Add
@vitest/coverage-v8and@vitest/coverage-istanbulas optional dependency - by @alan-agius4 in #10025 (146d4) - Fix
defineHelperfor webkit async stack trace + update playwright 1.59.0 - by @hi-ogawa in #10036 (5a5fa) - Fix suite hook throwing errors for unused auto test-scoped fixture - by @hi-ogawa and Claude Sonnet 4.6 in #10035 (39865)
- expect:
- snapshot:
- ui:
- Don't leak vite types - by @sheremet-va in #10005 (fdff1)
- vm:
View changes on GitHub
v4.1.2
This release bumps Vitest's flatted version and removes version pinning to resolve flatted's CVE related issues (#9975).
🐞 Bug Fixes
- Don't resolve
setupFilesfrom parent directory - by @hi-ogawa in #9960 (7aa93) - Ensure sequential mock/unmock resolution - by @hi-ogawa and Claude Opus 4.6 in #9830 (7c065)
- browser: Take failure screenshot if
toMatchScreenshotcan't capture a stable screenshot - by @macarie in #9847 (faace) - coverage: Correct
coverageConfigDefaultsvalues and types - by @Arthie in #9940 (b3c99) - pretty-format: Fix output limit over counting - by @hi-ogawa in #9965 (d3b7a)
- Disable colors if agent is detected - by @sheremet-va and @AriPerkkio in #9851 (6f97b)
View changes on GitHub
v4.1.1
🚀 Features
- experimental:
- Expose
matchesTagsto test if the current filter matches tags - by @sheremet-va in #9913 (eec53) - Introduce
experimental.vcsProvider- by @sheremet-va in #9928 (56115)
- Expose
🐞 Bug Fixes
- Mark
TestProject.testFilesListinternal properly - by @sapphi-red in #9867 (54f26) - Detect fixture that returns without calling
use- by @oilater in #9831 and #9861 (633ae) - Drop vite 8.beta support - by @AriPerkkio in #9862 (b78f5)
- Type regression in vi.mocked() static class methods - by @purepear and @hi-ogawa in #9857 (90926)
- Properly re-evaluate actual modules of mocked external - by @hi-ogawa in #9898 (ae5ec)
- Preserve coverage report when html reporter overlaps - by @hi-ogawa in #9889 (2d81a)
- Provide
vi.advanceTimersto the preview provider - by @sheremet-va in #9891 (1bc3e) - Don't leak event listener in playwright provider - by @sheremet-va in #9910 (d9355)
- Open browser in
--standalonemode without running tests - by @sheremet-va in #9911 (e78ad) - Guard disposable and optional
body- by @sheremet-va in #9912 (6fdb2) - Resolve
retry.conditionRegExp serialization issue - by @nstepien and @hi-ogawa in #9942 (7b605) - collect:
- Don't treat extra props on
testreturn as tests - by @sheremet-va in #9871 (141e7)
- Don't treat extra props on
- coverage:
- Simplify provider types - by @AriPerkkio in #9931 (aaf9f)
- Load built-in provider without module runner - by @AriPerkkio in #9939 (bf892)
- expect:
- pretty-format: