v4 adds visual regression testing, which would allow us to replace playwright.
- Remove coverage.all: false (BREAKING CHANGE)
Impact: 23 vitest config files across packages
Files affected: All configs with coverage settings (packages/ui-common, packages/header, packages/navbar, etc.)
The coverage.all option has been removed in v4. Your configs currently use:
coverage: {
include: ["src/*"],
all: false, // ❌ This option no longer exists
}
Action required: Remove the all: false line from all vitest configs. In v4, coverage only includes files loaded
during testing by default (which matches your previous all: false behavior).
Updated config should be:
coverage: {
include: ["src/*"],
// 'all' option removed - v4 default behavior matches old 'all: false'
}
Locations found at:
- packages/ui-common/vitest.config.ts:18
- packages/header/vitest.config.ts:12
- packages/header-mui5/vitest.config.ts:12
- packages/flex-layout-plugin/vitest.config.ts:12
- packages/google-analytics/vitest.config.ts:12
- packages/navbar/vitest.config.ts:13
- (and 17+ more config files)
Other Breaking Changes (Low/No Impact on Your Codebase)
- Default Exclusions Simplified
Vitest v4 now only excludes node_modules and .git by default. Previously excluded patterns (dist, cypress, etc.)
are no longer automatic.
Impact: None detected in your configs
Recommendation: If you rely on default exclusions, consider adding explicit test.exclude patterns
- globals: true Remains Valid
Your configs use globals: true extensively. This is still supported in v4, no changes needed.
- Mock System Changes
- vi.fn().getMockName() returns vi.fn() instead of spy (may affect snapshots)
- invocationCallOrder now starts at 1 instead of 0
Impact: No usage found in your test files
Action: If you have snapshot tests on mocks, they may need updating after migration
Migration Checklist
- ✅ Remove coverage.all: false from all 23 vitest.config.ts files
- ✅ Update vitest dependency from 3.x to 4.x in all package.json files
- ✅ Update @vitest/coverage-v8 from 3.x to 4.x
- ⚠️ Run tests after upgrade to check for snapshot failures
- ⚠️ Verify coverage reports work as expected
v4 adds visual regression testing, which would allow us to replace playwright.
Impact: 23 vitest config files across packages
Files affected: All configs with coverage settings (packages/ui-common, packages/header, packages/navbar, etc.)
The coverage.all option has been removed in v4. Your configs currently use:
coverage: {
include: ["src/*"],
all: false, // ❌ This option no longer exists
}
Action required: Remove the all: false line from all vitest configs. In v4, coverage only includes files loaded
during testing by default (which matches your previous all: false behavior).
Updated config should be:
coverage: {
include: ["src/*"],
// 'all' option removed - v4 default behavior matches old 'all: false'
}
Locations found at:
Other Breaking Changes (Low/No Impact on Your Codebase)
Vitest v4 now only excludes node_modules and .git by default. Previously excluded patterns (dist, cypress, etc.)
are no longer automatic.
Impact: None detected in your configs
Recommendation: If you rely on default exclusions, consider adding explicit test.exclude patterns
Your configs use globals: true extensively. This is still supported in v4, no changes needed.
Impact: No usage found in your test files
Action: If you have snapshot tests on mocks, they may need updating after migration
Migration Checklist