Releases: vitest-dev/vitest
Releases · vitest-dev/vitest
v4.0.0-beta.7
🚀 Features
- api:
- Expose
experimental_parseSpecifications
- by @sheremet-va in #8408 (fdeb2) - Expose Vitest watcher - by @sheremet-va in #8413 (aaa6e)
- Expose
- browser:
- Add
trackUnhandledErrors
option - by @sheremet-va in #8386 (c0ec0)
- Add
🐞 Bug Fixes
- Make sure test errors always have
stacks
property in Node.js context - by @sheremet-va in #8392 (b825e) - jsdom: Override globals that Fetch API relies on - by @sheremet-va in #8390 (05b41)
View changes on GitHub
v4.0.0-beta.6
🚨 Breaking Changes
- Rewrite spying implementation to make module mocking more intuitive - by @sheremet-va in #8363 (9e412)
- reporter: Remove deprecated APIs - by @AriPerkkio and @sheremet-va in #8223 (149f8)
🐞 Bug Fixes
- Screenshot masks with Playwright provider - by @macarie in #8357 (459ef)
- Configure
oxc
instead ofesbuild
onrolldown-vite
- by @hi-ogawa in #8378 (e922e) - deps: Update all non-major dependencies - in #8348 (13f94)
- vitest: Override
config.include
option withconfig.browser.instances[].include
option if it is specified - by @Shinyaigeek in #8260 (010fc)
View changes on GitHub
v4.0.0-beta.5
🚨 Breaking Changes
- Use module-runner instead of vite-node - by @sheremet-va and @AriPerkkio in #8208 (9be01)
- runner: Set mode to
todo
if no function is passed down totest
ordescribe
- by @sheremet-va in #8346 (1a81c)
🐞 Bug Fixes
- Invalidate modules in all module graphs when the file is changed - by @sheremet-va in #8352 (94ab3)
- wdio: Properly construct the shadow root selector if there are multiple elements - by @sheremet-va in #8354 (28765)
View changes on GitHub
v4.0.0-beta.4
🚀 Features
- browser:
🐞 Bug Fixes
- Add
--changed
flag support tovitest list
command - by @haakonjackfloat in #8270 and #8272 (e71a5) - Prevent rpc timeout on slow thread blocking synchronous methods - by @AriPerkkio and @sheremet-va in #8297 (bea87)
- Forbid setting environment to
browser
- by @sheremet-va in #8334 (0417a) - deps: Update all non-major dependencies - in #8328 (aa79e)
- wdio: Wait for the driver to be properly closed - by @sheremet-va in #8305 (c16ab)
View changes on GitHub
v4.0.0-beta.3
🚨 Breaking Changes
- Remove deprecated
workspace
option in favor ofprojects
- by @sheremet-va in #8218 (76fb7) - Ignore
--standalone
when CLI filename filter is used - by @AriPerkkio in #8262 (013bf)
🚀 Features
- Add spy option to vi.mockObject - by @rChaoz in #8285 (81d76)
- browser: Support
toBeInViewport
utility method to assert element is in viewport or not - by @Shinyaigeek in #8234 (ceed5) - expect: Support
toBeNullable
expect function to check provided value is nullish - by @Shinyaigeek and @sheremet-va in #8294 (eeec5) - mocker: Add
automocker
entry - by @sheremet-va in #8301 (e9c92)
🐞 Bug Fixes
- Remove unused dependencies - by @AriPerkkio in #8184 (feadc)
- Distribute test files to shards more evenly - by @Shinyaigeek and @AriPerkkio in #8288 (7b489)
- Use suite's timeout when
test.extend
- by @AriPerkkio in #8278 (43977) - Support snapshot with no object key sorting - by @hi-ogawa and @sheremet-va in #8136 (e85e3)
- Annotation location always points to the test file - by @sheremet-va in #8315 (88071)
- core:
- Fix
objectContaining
expect utility to have more compatibility to jest's one - by @Shinyaigeek in #8241 (480be)
- Fix
- coverage:
- Include files based on
--project
filter - by @gtbuchanan in #7885 (761be) - Prevent encoding filenames of uncovered files - by @AriPerkkio in #8239 (8a998)
- Include files based on
- deps:
- Update all non-major dependencies - by @sheremet-va in #8235 (a1e57)
- mocker:
- reporter:
- Invisible CLI menus when
vitest --standalone
- by @AriPerkkio in #8248 (37cc2)
- Invisible CLI menus when
- rolldown-vite:
- Properly disable minifier in the browser client - by @sheremet-va in #8306 (f55bb)
- watch:
- Filename filter runs duplicate tests in workspaces - by @AriPerkkio in #8250 (932d8)
View changes on GitHub
v4.0.0-beta.2
🚨 Breaking Changes
- Remove support for Vite 5 - by @sheremet-va in #8202 (cb8b0)
- Remove deprecated types - by @sheremet-va in #8203 (66bee)
- Remove deprecated environmentMatchGlobs and poolMatchGlobs - by @sheremet-va in #8205 (be11d)
- snapshot: Fail test with obsolete snapshot on CI - by @hi-ogawa in #7963 (4d84f)
- spy: Support spying on classes - by @sheremet-va in #6160 (abc0d)
🚀 Features
- Add
onUnhandledError
callback - by @sheremet-va in #8162 (924cb)
🐞 Bug Fixes
- Allow overriding globals in types - by @sheremet-va in #8215 (2248b)
- browser: Run in-source tests only when the file itsels is a test file - by @sheremet-va in #8204 (bdd2e)
View changes on GitHub
v4.0.0-beta.1
🚨 Breaking Changes
- Remove
'basic'
reporter - by @AriPerkkio in #7884 (82fcf) - Simplify default exclude pattern - by @sheremet-va in #6287 (14c50)
- Remove deprecated getSourceMap - by @sheremet-va in #8194 (ff934)
- Replace deprecated ErrorWithDiff with TestError - by @sheremet-va in #8195 (da59e)
- Remove UserConfig type in favor of ViteUserConfig - by @sheremet-va in #8196 (22f7f)
- Remove deprecated coverage options in favor of
vitest/node
exports - by @sheremet-va in #8197 (dc848) - Remove deprecated internal helpers and environment exports - by @sheremet-va in #8198 (4703c)
- Remove deprecated typecheck and runner types - by @sheremet-va in #8199 (89a1c)
- Remove Node types from the main entry point, use
vitest/node
instead - by @sheremet-va in #8200 (1e60c) - coverage:
- V8 to support only AST based remapping by @AriPerkkio in #8064 (176133e)
- Remove
.all
, reworkedinclude/exclude
by @AriPerkkio in #7837 (41a111c)
🚀 Features
- Provide entity to onConsoleLog - by @sheremet-va in #8159 (437d4)
🐞 Bug Fixes
View changes on GitHub
v3.2.4
🐞 Bug Fixes
- Use correct path for optimisation of strip-literal - by @mrginglymus in #8139 (44940)
- Print uint and buffer as a simple string - by @sheremet-va in #8141 (b86bf)
- browser:
- Show a helpful error when spying on an export - by @sheremet-va in #8178 (56007)
- cli:
vitest run --watch
should be watch-mode - by @AriPerkkio in #8128 (657e8)- Use absolute path environment on Windows - by @colinaaa in #8105 (85dc0)
- Throw error when
--shard x/<count>
exceeds count of test files - by @AriPerkkio in #8112 (8a18c)
- coverage:
- Ignore SCSS in browser mode - by @sheremet-va in #8161 (0c3be)
- deps:
- expect:
- pool:
- Auto-adjust
minWorkers
when onlymaxWorkers
specified - by @AriPerkkio in #8110 (14dc0)
- Auto-adjust
- reporter:
task.meta
should be available in custom reporter's errors - by @AriPerkkio in #8115 (27df6)
- runner:
- Preserve handler wrapping on extend - by @pengooseDev in #8153 (a9281)
- ui:
View changes on GitHub
v3.2.3
🚀 Features
- browser: Use base url instead of vitest - by @sheremet-va in #8126 (1d8eb)
- ui: Show test annotations and metadata in the test report tab - by @sheremet-va in #8093 (c69be)
🐞 Bug Fixes
- Rerun tests when project's setup file is changed - by @sheremet-va in #8097 (0f335)
- Revert
expect.any
return type - by @sheremet-va in #8129 (47514) - Run only the name plugin last, not all config plugins - by @sheremet-va in #8130 (83862)
- pool:
- Throw if user's tests use
process.send()
- by @AriPerkkio in #8125 (dfe81)
- Throw if user's tests use
- runner:
- Fast sequential task updates missing - by @AriPerkkio in #8121 (7bd11)
- Comments between fixture destructures - by @AriPerkkio in #8127 (dc469)
- vite-node:
- Unable to handle errors where sourcemap mapping empty - by @blake-newman and @hi-ogawa in #8071 (8aa25)
View changes on GitHub
v3.2.2
🚀 Features
- Support rolldown-vite - by @sheremet-va and @hi-ogawa in #7509 (c8d62)
🐞 Bug Fixes
- browser:
- Calculate prepare time from
createTesters
call on the main thread - by @sheremet-va in #8101 (142c7) - Optimize build output and always prebundle vitest - by @sheremet-va (00a39)
- Make custom locators available in
vitest-browser-*
packages - by @sheremet-va in #8103 (247ef)
- Calculate prepare time from
- expect:
- reporter:
- Allow
dot
reporter to work in non interactive terminals - by @bstephen1 and @AriPerkkio in #7994 (6db9f)
- Allow