Migrating to Vitest v3.2.0
Version v3.2.0 introduces 3 breaking changes. This guide details how to update your code.
Released: 6/2/2025
3
Breaking Changes
6
Migration Steps
19
Affected Symbols
⚠️ Check Your Code
If you use any of these symbols, you need to read this guide:
ctx.signaltest.namevi.mockObjectwatchTriggerPatternsworkspaceprojectsmocked functions resource managementsequence.groupOrderTemporal equalitytotalTimeselfTimeAnnotation APIbrowser.connectscreenshot.savelocators.extendonWritePathfixturesmicromatchpicomatchBreaking Changes
●Issue #1
Removed unused exports may cause import errors for code that imported them.
●Issue #2
The `workspace` configuration option has been removed; using it will cause a runtime error.
●Issue #3
The internal pattern matching library was switched from `micromatch` to `picomatch`, which may change pattern matching behavior.
Migration Steps
- 1Replace any usage of the `workspace` configuration option with `projects`.
- 2Check your imports for symbols that were removed as unused exports and delete or replace them.
- 3If you relied on `micromatch`‑specific pattern behavior, verify patterns work as expected with `picomatch`.
- 4Update any custom reporters or CI integrations to handle the new `onWritePath` option if used.
- 5Review browser configuration to use the new `connect`, `screenshot.save`, and custom locators APIs where applicable.
- 6If you use per‑file or per‑worker fixtures, adjust your fixture definitions to the new API.
Release Summary
Vitest vX.Y introduces many new features such as `ctx.signal`, custom test name colors, and browser enhancements, while deprecating `workspace` in favor of `projects` and fixing numerous bugs.
Need More Details?
View the full release notes and all changes for Vitest v3.2.0.
View Full Changelog