v3.2.0-beta.1
📦 vitestView on GitHub →
✨ 6 features🐛 1 fixes⚡ 1 deprecations🔧 8 symbols
Summary
Vitest 3.2.0‑beta.1 introduces several new APIs such as `ctx.signal`, custom test name colors, `vi.mockObject`, and a `watchTriggerPatterns` option, deprecates `workspace` in favor of `projects`, and adds experimental V8 coverage remapping.
Migration Steps
- Replace any usage of the `workspace` config field with `projects` in your Vitest configuration.
- If you rely on coverage reporting, verify that the V8 experimental AST‑aware remapping works for your setup; enable it via the `coverage.v8Remap` option if needed.
✨ New Features
- Provide `ctx.signal` – adds a new signal API to the test context.
- Support custom colors for `test.name` – allows customizing test name colors via configuration.
- Add `vi.mockObject` – enables automocking of any object.
- Introduce `watchTriggerPatterns` option – new watch mode pattern trigger configuration.
- `browser` provider: implement `connect` option for Playwright – allows connecting to an existing browser instance.
- `coverage`: V8 experimental AST‑aware remapping – improves source‑map handling for coverage reports.
🐛 Bug Fixes
- `browser`: Resolve file‑system commands relative to the project root.
🔧 Affected Symbols
ctx.signaltest.namevi.mockObjectwatchTriggerPatternsworkspaceprojectsbrowser.connectcoverage.v8Remap⚡ Deprecations
- `workspace` configuration option is deprecated; use `projects` instead. Update your config files to replace `workspace` with `projects`.