Releases: vitest-dev/vitest
Releases · vitest-dev/vitest
v4.0.0-beta.11
🚨 Breaking Changes
- Verbose reporter prints tests in a list, introduce
tree
reporter - by @sheremet-va and @AriPerkkio in #8500 (25fd3) - Include shadow root contents in pretty-format output - by @wkillerud in #8545 (9e722)
- expect: Pass current equality testers to asymmetric matcher - by @hi-ogawa in #6825 (965ce)
- projects: Allow only files that have "vitest.config" or "vite.config" in the name - by @sheremet-va in #8542 (304bc)
🚀 Features
- Clickable dashboard numbers - by @shairez in #7406 (2344c)
- Display test "path" when filtering - by @userquin in #8547 (2e491)
🐞 Bug Fixes
- Custom expect messages for
expect.extend
matchers - by @lzl0304 in #8520 (96945) - Process sourcemaps for stack traces from
globalSetup
files - by @sheremet-va in #8534 (8978a) - Resolve performance issue when throwing errors with stackTraceLimit = 0 - by @Copilot, sheremet-va and @AriPerkkio in #8531 (6d5b5)
- Avoid recursively applying
$
and%
formatting totest.for/each
title - by @hi-ogawa in #8557 (ea6d7) - Replace wildcard exports
"./*"
with specific files in vitest package - by @hi-ogawa in #8560 (ce746) - Don't publish unused d.ts files - by @sheremet-va in #8562 (42dfd)
- browser: Don't import from
vite
directly - by @sheremet-va in #8541 (d7fca) - deps: Update all non-major dependencies - in #8550 (048f7)
- spy: Can respy on an exported method - by @sheremet-va in #8521 (bf450)
🏎 Performance
- Replace startsWith with strict equality - by @btea in #8546 (c42e6)
- Reduce the number of unused imports - by @sheremet-va in #8508 (9a79b)
View changes on GitHub
v4.0.0-beta.10
🚨 Breaking Changes
- browser: Require a provider factory instead of a string - by @sheremet-va in #8445 (606cb)
🚀 Features
- api:
- Add
relativeModuleId
toTestModule
- by @sheremet-va in #8505 (3be09)
- Add
- browser:
- Support iframe locator with playwright provider - by @sheremet-va in #8016 (57b2c)
- Add
length
property to locators,toHaveLength
now accepts locators - by @sheremet-va in #8512 (2308c)
- coverage:
autoUpdate
to support percentage formatting - by @Battjmo and @AriPerkkio in #8456 (99e01)
🐞 Bug Fixes
- Support
import.meta.resolve
on Vite 7 - by @hi-ogawa in #8493 (549d3) - Show the assertion error first when
expect.poll
assertion fails - by @sheremet-va in #8483 (fb450) - Override fake timers when
useFakeTimers
is called multiple times - by @sheremet-va in #8504 (ed7e3) - deps: Update all non-major dependencies - by @sheremet-va in #8382 (704eb)
- runner: Don't bundle runner with utils - by @sheremet-va in #8496 (2b4b0)
- spy: Fix spyOn types with optional method - by @sheremet-va in #8499 (d3afa)
🏎 Performance
- Use ES2022 language features - by @TrevorBurnham in #8492 (bb34c)
- Delay populating node-globals - by @sheremet-va in #8506 (41cbc)
- Get
workerId
from a global object - by @sheremet-va in #8507 (46b13) - Update
tinypool
tov2.0.0
- by @AriPerkkio in #8513 (a8c7f)
View changes on GitHub
v4.0.0-beta.9
🚨 Breaking Changes
- Remove
minWorkers
and set it automatically to 0 in non watch mode - by @sheremet-va in #8454 (2c2d1)
🚀 Features
- api: Add
getGlobalTestNamePattern
method - by @sheremet-va in #8438 (bdb70)
🐞 Bug Fixes
- browser:
locator.element()
returnsHTMLElement
orSVGElement
- by @sheremet-va in #8440 (c1ac1)
- coverage:
- Handle query param based transforms correctly - by @AriPerkkio in #8418 (a400a)
- Enforce order of
vitest:coverage-transform
plugin - by @AriPerkkio in #8477 (ff517)
- utils:
🏎 Performance
- Avoid spawning extra workers if no tests will run there - by @sheremet-va in #8446 (3fb3e)
- Don't set
process.title
- by @sheremet-va in #8453 (0a766) - Remove chai as a direct dependency, keep it in
@vitest/expect
- by @sheremet-va in #8461 (cc98c) - Reduce the amount of dynamic imports - by @sheremet-va in #8465 (db6cd)
View changes on GitHub
v4.0.0-beta.8
🚨 Breaking Changes
- Remove deprecated APIs - by @sheremet-va in #8428 (a1cb9)
🚀 Features
- api: Add
enableCoverage
anddisableCoverage
methods - by @sheremet-va and @AriPerkkio in #8412 (61eb7)
View changes on GitHub
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 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)