Releases: vitest-dev/vitest
Releases · vitest-dev/vitest
v4.1.0-beta.1
🚀 Features
- Return a disposable from doMock() - by @kirkwaiblinger in #9332 (e3e65)
- Added chai style assertions for spying - by @ronnakamoto and @sheremet-va in #8842 (841df)
- Update to sinon/fake-timers v15 and add
setTickModeto timer controls - by @atscott and @sheremet-va in #8726 (4b480) - api:
- Support tests starting or ending with
testinexperimental_parseSpecification- by @jgillick and Jeremy Gillick in #9235 (2f367) - Add filters to
createSpecification- by @sheremet-va in #9336 (c8e6c) - Expose
runTestFilesas alternative torunTestSpecifications- by @sheremet-va in #9443 (43d76)
- Support tests starting or ending with
- browser:
- coverage:
- Support
ignore start/stopignore hints - by @AriPerkkio in #9204 (e59c9)
- Support
- experimental:
- Add
onModuleRunnerhook toworker.init- by @sheremet-va in #9286 (e977f)
- Add
- runner:
- Enhance
retryoptions - by @MazenSamehR, Matan Shavit, @AriPerkkio and @sheremet-va in #9370 (9e4cf)
- Enhance
🐞 Bug Fixes
- Deprecate several vitest/* entry points - by @sheremet-va in #9347 (fd459)
- Use
meta.urlincreateRequire- by @sheremet-va in #9441 (e3422) - Preact browser mode init example of render function not async - by @WuMingDao in #9375 (2bea5)
- browser: Avoid updating screenshots when
toMatchScreenshotpasses - by @macarie in #9289 (46aab) - coverage: Infer transform mode for uncovered files - by @AriPerkkio in #9435 (f3967)
- deps: Update all non-major dependencies - by @hi-ogawa in #9192 (90c30)
View changes on GitHub
v4.0.17
🚀 Experimental Features
- Support openTelemetry for browser mode - by @hi-ogawa in #9180 (1ec3a)
- Support TRACEPARENT and TRACESTATE environment variables for OpenTelemetry context propagation - by @Copilot, hi-ogawa and @hi-ogawa in #9295 (876cb)
🐞 Bug Fixes
- Improve asymmetric matcher diff readability by unwrapping container matchers - by @Copilot, sheremet-va, hi-ogawa and @hi-ogawa in #9330 (b2ec7)
- Improve runner error when importing outside of test context - by @sheremet-va in #9335 (2dd3d)
- Replace crypto.randomUUID to allow insecure environments (fix #9… - by @plusgut in #9339 and #9 (e6a3f)
- Handle null options in
addEventHandler#9371 - by @ThibautMarechal in #9372 and #9371 (40841) - Typo in browser.provider error - by @deammer in #9394 (4b67f)
- browser:
- Fix
process.envandimport.meta.envdefines in inline project - by @hi-ogawa in #9239 (b70c9) - Fix upload File instance - by @hi-ogawa in #9294 (b6778)
- Fix invalid project token for artifacts assets - by @hi-ogawa in #9321 (caa7d)
- Log
ErrorEvent.messagewhen unhandledErrorEvent.erroris null - by @hi-ogawa in #9322 (5d84e) - Support
fileParallelismon an instance - by @sheremet-va in #9328 (15006)
- Fix
- coverage:
- Remove unnecessary
istanbul-lib-source-mapsusage - by @AriPerkkio in #9344 (b0940) - Apply patch from istanbuljs/istanbuljs#837 - by @AriPerkkio and sapphi-red in #9413 and #837 (e05ce)
- Remove unnecessary
- fsModuleCache:
- Don't store importers in cache - by @sheremet-va in #9422 (75136)
- Add importers alongside importedModules - by @sheremet-va in #9423 (59f92)
- mocker:
- pool:
- Validate environment options when reusing the worker - by @sheremet-va in #9349 (a8a88)
- Handle worker start failures gracefully - by @AriPerkkio in #9337 (200da)
- reporter:
- Report test module if it failed to run - by @sheremet-va in #9272 (c7888)
- runner:
- Respect nested test.only within describe.only - by @Ujjwaljain16 in #9021 and #9213 (55d5d)
- typecheck:
- Improve error message when tsc outputs help text - by @Ujjwaljain16 in #9214 (7b10a)
- ui:
- webdriverio:
- Fall back to WebDriver Classic #9244 - by @JustasMonkev in #9373 and #9244 (c23dd)
View changes on GitHub
v4.0.16
🐞 Bug Fixes
- Fix browser mode default testTimeout back to 15 seconds - by @hi-ogawa in #9167 (da0ad)
- Avoid crashing on
process.versionsstub - by @AriPerkkio in #9174 (78cfb) - Reject calling suite function inside test - by @hi-ogawa in #9198 (1a259)
- Allow inlining fully dynamic import - by @hi-ogawa in #9137 (56851)
- Fix module graph UI on html reporter with headless browser mode - by @hi-ogawa in #9219 (60642)
- Log deprecated
test.poolOptionsif it's set - by @sheremet-va in #9226 (f7f6a) - browser:
- coverage:
- Istanbul untested files source maps are off - by @AriPerkkio in #9208 (372e8)
- experimental:
- Export
setupEnvironmentfor custom pools - by @AriPerkkio in #9187 (5d26b)
- Export
View changes on GitHub
v4.0.15
🚀 Experimental Features
- cache: Add opt-out on a plugin level, fix internal root cache - by @sheremet-va in #9154 (a68f7)
- reporters: Print import duration breakdown - by @sheremet-va in #9105 (122ff)
🐞 Bug Fixes
- Keep built-in id as is in bun and deno - by @sheremet-va in #9117 (075ab)
- Use
optimizeDeps.rolldownOptionsto fix depreated warning + fixssr.external: true- by @hi-ogawa in #9121 (fd8bd) - Fix external behavior with
deps.optimizer- by @hi-ogawa in #9125 (4c754) - Very minor typo in "Chrome DevTools Protocol" - by @HowToTestFrontend in #9146 (20997)
- browser: Run
toMatchScreenshotonly once when used withexpect.element- by @macarie in #9132 (0d2e7) - coverage: Istanbul provider to not break source maps - by @AriPerkkio in #9040 (e4ca9)
- deps: Update dependency tinyexec to v1 - in #9122 (fd786)
- docs: Remove
--browser.providerfrom docs - by @sheremet-va in #9115 (120b3) - expect: Preserve
currentTestNamein extended matchers - by @macarie in #9106 (e4345) - pool: Terminate workers on
CTRL+cforceful exits - by @AriPerkkio in #9140 (d57d8) - reporters: Show project in github reporter - by @sheremet-va in #9138 (bb65e)
- spy: Do not mock overriden method, if parent was automocked - by @sheremet-va in #9116 (1a246)
- web-worker: MessagePort objects passed to Worker.postMessage work when clone === "native" - by @whitphx in #9118 (deee8)
View changes on GitHub
v4.0.14
🚀 Experimental Features
- browser: Expose
utils.configurePrettyDOM- by @sheremet-va in #9103 (2cc34) - runner: Add full names to tasks - by @macarie in #9087 (821aa)
- ui: Add tabbed failure view for
toMatchScreenshotwith comparison slider - by @macarie in #8813 (c37c2)
🐞 Bug Fixes
- Externalize before caching - by @sheremet-va in #9077 (e1b2e)
- Collect the duration of external imports - by @sheremet-va in #9097 (3326c)
- Rename
collecttoimport, removeprepare- by @sheremet-va in #9091 (1256b) - browser:
- Unsubscribe
onCancelon rpc destroy - by @AriPerkkio in #9088 (f5b72) - Revert the viewport scaling in non-ui mode #9018 - by @sheremet-va in #9072 and #9018 (64502)
- Unsubscribe
- coverage:
- expect:
- jsdom:
- Reuse abort signals if possible - by @sheremet-va in #9090 (2c468)
- pool:
- Init
VITEST_POOL_ID+VITEST_WORKER_IDbefore environment setup - by @AriPerkkio in #9085 (37918)
- Init
- web-worker:
postMessageto send ports to workers - by @whitphx and @AriPerkkio in #9078 (9d176)
🏎 Performance
- Replace
debugwithobug- by @sxzz and @AriPerkkio in #9057 (acc51)
View changes on GitHub
v4.0.13
🐞 Bug Fixes
- types:
- Don't use type from Vite 7.1 - by @sheremet-va in #9071 (6356b)
- Don't import node.js dependent types in vitest/browser - by @sheremet-va in #9068 (332af)
🏎 Performance
- Avoid fetchModule roundtrip if the module is cached - by @sheremet-va in #9075 (b27e0)
- experimental: If
fsCacheModuleis enabled, read from the memory when possible - by @sheremet-va in #9076 (6b9a1)
View changes on GitHub
v4.0.12
🐞 Bug Fixes
- Inherit
fsModuleCachePathby default - by @sheremet-va in #9063 (9a8bc) - Don't import from
@opentelemetry/apiin public types - by @sheremet-va in #9066 (e944a)
View changes on GitHub
v4.0.11
🚀 Experimental Features
- api: Add extensible test artifact API - by @macarie in #8987 (77292)
- See more at https://vitest.dev/api/advanced/artifacts
- expect: Provide
taskinMatchState- by @macarie in #9022 (afd1f) - experimental: Support OpenTelemetry traces - by @sheremet-va in #8994 (d6d33)
- See more at https://vitest.dev/guide/open-telemetry
🏎 Performance
- experimental: Add file system cache - by @sheremet-va in #9026 (1b147)
View changes on GitHub
v4.0.10
🐞 Bug Fixes
- Remove
onCancelwhen worker is terminated - by @sheremet-va in #9033 (6d7f0) - browser:
- bun:
- Parsing of stack trace for bun runtime - by @nazarhussain in #9032 (f3ec6)
- core:
- Prevent starting new run when cancelling - by @AriPerkkio in #8991 (eb98d)
- pool:
- Prevent writing to closed worker - by @AriPerkkio and @sheremet-va in #9023 (042c6)
- reporters:
- Report correct test run duration at the end - by @sheremet-va in #8969 (bc3a6)
- ui:
View changes on GitHub
v4.0.9
🚀 Experimental Features
- expect: Add Set support to toBeOneOf - by @tim-we and @sheremet-va in #8906 (a415d)
🐞 Bug Fixes
- browser: Add favicon icons to the browser mode ui - by @userquin in #8972 (353ee)
- forks: Increase worker start timeout - by @AriPerkkio in #9027 (5e750)
- jsdom: Cloned request is an instance of
Request- by @sheremet-va in #8985 (506a9) - ui: Collect file/suite/test duration correctly - by @userquin in #8976 (8016d)