v4.0.0-beta.9
Breaking Changes📦 vitestView on GitHub →
⚠ 1 breaking✨ 1 features🐛 4 fixes🔧 6 symbols
Summary
Vitest v4.0.0‑beta.9 introduces the `getGlobalTestNamePattern` API, fixes several browser and coverage issues, and removes the `minWorkers` config, requiring a small migration step.
⚠️ Breaking Changes
- Removed `minWorkers` configuration option; it is now automatically set to 0 in non‑watch mode. Update your Vitest config to omit `minWorkers` or rely on the default behavior.
Migration Steps
- Delete any `minWorkers` setting from your Vitest configuration; the runner will set it to 0 automatically when not in watch mode.
- If you imported `utils.ast`, replace it with an alternative AST utility or remove the import.
- Switch direct `chai` imports to `@vitest/expect` if you relied on the previous dependency.
✨ New Features
- Added `getGlobalTestNamePattern` method to the Vitest API.
🐛 Bug Fixes
- `locator.element()` now correctly returns an `HTMLElement` or `SVGElement` in the browser environment.
- Coverage transforms now handle query‑parameter‑based transforms correctly.
- Enforced the execution order of the `vitest:coverage-transform` plugin.
- Removed the `ast` export from `utils`.
🔧 Affected Symbols
VitestConfig.minWorkersgetGlobalTestNamePatternlocator.elementvitest:coverage-transform pluginutils.astchai