Change8

v4.1.1

📦 vitestView on GitHub →
3 features🐛 16 fixes🔧 5 symbols

Summary

This patch introduces experimental features like `matchesTags` and `experimental.vcsProvider`, alongside numerous bug fixes across mocking, coverage, assertions, and formatting.

Migration Steps

  1. If you rely on Vite 8.beta, you must upgrade Vite or expect test failures/instability as support has been dropped.

✨ New Features

  • Expose `matchesTags` in experimental mode to test if the current filter matches tags.
  • Introduce `experimental.vcsProvider`.
  • Provide `vi.advanceTimers` to the preview provider.

🐛 Bug Fixes

  • Mark `TestProject.testFilesList` internal properly.
  • Detect fixture that returns without calling `use`.
  • Drop vite 8.beta support.
  • Fix type regression in vi.mocked() static class methods.
  • Properly re-evaluate actual modules of mocked external modules.
  • Preserve coverage report when html reporter overlaps.
  • Don't leak event listener in playwright provider.
  • Open browser in `--standalone` mode without running tests.
  • Guard disposable and optional `body`.
  • Resolve `retry.condition` RegExp serialization issue.
  • In collection, don't treat extra props on `test` return as tests.
  • Coverage: Simplify provider types.
  • Coverage: Load built-in provider without module runner.
  • Expect: Soft assertions continue after .resolves/.rejects promise errors.
  • Expect: Fix sinon-chai style API.
  • Pretty-format: Limit output for large objects.

Affected Symbols