🚀 Features
- Support type inference with a new
test.extendsyntax - by @sheremet-va in #9550 (e5385) - Support vite 8 beta, fix type issues in the config with different vite versions - by @sheremet-va in #9587 (99028)
- Add assertion helper to hide internal stack traces - by @hi-ogawa and Claude Sonnet 4.5 in #9594 (eeb0a)
- Store failure screenshots using artifacts API - by @macarie in #9588 (24603)
- Allow
vitest listto statically collect tests instead of running files to collect them - by @sheremet-va in #9630 (7a8e7) - Add
--detect-async-leaks- by @AriPerkkio in #9528 (c594d) - api: Allow passing down test cases to
toTestSpecification- by @sheremet-va in #9627 (6f17d) - fixtures: Pass down file context to
beforeAll/afterAll- by @sheremet-va in #9572 (c8339) - ui: Add duration sorting to explorer - by @julianhahn and @cursoragent in #9603 (209b1)
🐞 Bug Fixes
- Close vitest if it failed to start - by @sheremet-va in #9573 (728ba)
- Fix ssr environment runner in project - by @hi-ogawa in #9584 (09006)
- Trim trailing white spaces in code block - by @hi-ogawa in #9591 (f78be)
- Support inline snapshot inside test.for/each - by @hi-ogawa in #9590 (615fd)
- Apply source maps for external module stack trace - by @hi-ogawa in #9152 (79e20)
- Remove the
.namefrom statically collected test - by @sheremet-va in #9596 (b66ff) - Don't suppress warnings on pnp - by @sheremet-va in #9602 (89cbd)
- Support snapshot with
expect.soft- by @iumehara, @hi-ogawa and Claude Sonnet 4.5 in #9231 (3eb2c) - Log seed when only
sequence.shuffle.testsis enabled - by @kaigritun, Kai Gritun and @sheremet-va in #9576 (8182b) - Externalize
expect/src/utilsfromvitest- by @hi-ogawa in #9616 (48739) - Ignore test.override during static collection - by @sheremet-va in #9620 (09174)
- Increase stacktrace limit for
--detect-async-leaks- by @AriPerkkio in #9638 (9fd4c) - Hanging-reporter link in cli - by @flx-sta in #9649 (7c103)
- Fix teardown timeout of
aroundEach/Allwhen inneraroundEach/Allthrows - by @hi-ogawa in #9657 (4ec6c) - Fix ui mode / html reporter and coverage integration - by @hi-ogawa and Claude Sonnet 4.5 in #9626 (86fad)
- Don't continue when
aroundEach/Allsetup timed out - by @hi-ogawa in #9670 (bb013) - Align
VitestRunnerConfigoptional fields withSerializedConfig- by @hi-ogawa in #9661 (79520) - Handle Symbol values in format utility - by @nami8824 in #9658 (0583f)
- Deprecate
toBe*spy assertions in favor oftoHaveBeen*(andtoThrowError) - by @sheremet-va in #9665 (4d390) - chai: Don't allow
deepEqualin the config because it's not serializable - by @sheremet-va in #9666 (9ee99) - docs: Fix old
/config/#optionhash links causing hydration errors - by @hi-ogawa, Claude Sonnet 4.5 and @sheremet-va in #9610 (a603c) - expect: Support arbitrary value equality for
toThrowand make Error detection robust - by @hi-ogawa and Claude Sonnet 4.5 in #9570 (de215) - ui: Don't fail if --ui and --root are specified together - by @sheremet-va in #9536 (d9305)
🏎 Performance
- pretty-format: Combine DOMElement plugins - by @sheremet-va in #9581 (da85a)