Migrating to Vitest v5.0.0-beta.2
Version v5.0.0-beta.2 introduces 7 breaking changes. This guide details how to update your code.
Released: 5/5/2026
⚠️ Check Your Code
If you use any of these symbols, you need to read this guide:
attachmentsDirsequentialconcurrentlocatorexpectautomockblob reporterconfigDefaults.reportersToMatchScreenshotResolvePathlogger.formatErrorV8 coveragejunit-reportersequence.concurrenttagsdescribe.fortask APIprivate method spy typesBreaking Changes
●Issue #1
Default `attachmentsDir` changed from `.vitest-attachements/` to `.vitest/attachments/`. Users should update configuration if they rely on the old path.
●Issue #2
The `sequential` test/suite option has been removed and replaced by the `concurrent` option. Use `concurrent: false` instead of `sequential: true`.
●Issue #3
Locator representation has changed from a string to an object. Code relying on locators being strings must be updated.
●Issue #4
The `expect` package has been inlined into Vitest core.
●Issue #5
Deprecated entry points have been removed. Check imports and update them if necessary.
●Issue #6
Automock deserialization in `mocker` now deserializes as automock.
●Issue #7
The default directory for the `blob` reporter and the `--merge-reports` flag is now `.vitest/blob/` instead of the previous default.
Migration Steps
- 1If you were using `attachmentsDir` pointing to `.vitest-attachements/`, update it to `.vitest/attachments/` or configure it explicitly.
- 2Replace usage of `sequential: true` in test/suite options with `concurrent: false`.
- 3Update any code that relies on locators being represented as strings, as they are now objects.
- 4Remove imports relying on deprecated entry points.
- 5If using the `blob` reporter or `--merge-reports`, note that the default output directory is now `.vitest/blob/`.
Release Summary
This release introduces significant breaking changes, including updating default attachment directories and replacing the `sequential` option with `concurrent`. New features focus on reporter enhancements and improved coverage tracking.
Need More Details?
View the full release notes and all changes for Vitest v5.0.0-beta.2.
View Full Changelog