Change8

v4.0.0-beta.6

Breaking Changes
📦 vitestView on GitHub →
2 breaking🐛 4 fixes🔧 5 symbols

Summary

Vitest v4.0.0-beta.6 introduces a rewritten spying system and removes deprecated reporter APIs, along with several bug fixes and dependency updates.

⚠️ Breaking Changes

  • Spying implementation was rewritten, causing existing mocks that relied on the previous behavior to break. Update mocks to use the new spying API as described in the updated documentation.
  • Reporter deprecated APIs were removed. Refactor any custom reporters or configuration that used the old APIs to the new reporter interface.

Migration Steps

  1. Review and adjust any spying code to align with the new implementation; refer to the migration guide for the updated API.
  2. Remove usage of removed reporter APIs and update custom reporters to the current reporter interface.
  3. If you rely on `config.include`, ensure it is not unintentionally overridden by `config.browser.instances[].include`, or adjust the configuration accordingly.

🐛 Bug Fixes

  • Fixed screenshot masks when using the Playwright provider.
  • Configured `oxc` as the bundler instead of `esbuild` for `rolldown-vite`.
  • Updated all non‑major dependencies to their latest versions.
  • When `config.browser.instances[].include` is specified, it now overrides the top‑level `config.include` option.

🔧 Affected Symbols

vi.spyOnReporter APIconfig.includeconfig.browser.instances[].includerolldown-vite bundler configuration