Change8

Migrating to Vitest v4.0.0-beta.3

Version v4.0.0-beta.3 introduces 2 breaking changes. This guide details how to update your code.

Released: 7/15/2025

2
Breaking Changes
2
Migration Steps
12
Affected Symbols

⚠️ Check Your Code

If you use any of these symbols, you need to read this guide:

workspaceprojects--standalonevi.mockObjectexpect.toBeInViewportexpect.toBeNullablemocker.automockerexpect.objectContainingcoverageregexpHoistablerolldown-vite.minifierwatch.filenameFilter

Breaking Changes

Issue #1

Removed the deprecated `workspace` option; use the new `projects` option instead.

Issue #2

The `--standalone` flag is ignored when a CLI filename filter is provided, which may change test execution behavior.

Migration Steps

  1. 1
    Replace any usage of the `workspace` configuration option with the new `projects` option.
  2. 2
    If you rely on `--standalone`, ensure you are not also using a CLI filename filter, or remove the filter.

Release Summary

Vitest v4.0.0-beta.3 adds spy support for mock objects, new expect utilities, and an automocker entry, while removing the deprecated `workspace` option and changing `--standalone` behavior, plus numerous bug fixes and dependency updates.

Need More Details?

View the full release notes and all changes for Vitest v4.0.0-beta.3.

View Full Changelog