Change8

v4.0.0-beta.5

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

Summary

This beta release switches the test runner to module-runner, adds automatic `todo` mode for empty tests, and includes bug fixes for module invalidation and wdio shadow root handling.

⚠️ Breaking Changes

  • The test runner now uses the module-runner package instead of vite-node. Update any custom integrations or scripts that import or depend on vite-node to use module-runner instead.
  • The runner now automatically sets its mode to `todo` when no function is passed to `test` or `describe`. Adjust any code that relied on the previous default mode to handle the new `todo` mode.

Migration Steps

  1. Replace imports of `vite-node` with `module-runner` in your project configuration and scripts.
  2. If you have custom runner logic that assumes a specific mode, add explicit mode handling because the runner will default to `todo` when no test function is provided.
  3. Run your test suite after the changes to verify that shadow root selectors work correctly in wdio environments.

🐛 Bug Fixes

  • Modules are now invalidated in all module graphs when a file changes, fixing stale module state.
  • The wdio integration now correctly constructs the shadow root selector when multiple elements are present.

🔧 Affected Symbols

module-runnervite-noderunnertestdescribe