Guides & FixesFix Vitest 5 bench No Longer Top-Level ExportVitest 5 removes bench as a top-level export. Fix it by moving benchmarks into a test() context fixture instead.Aug 13, 2026Read more →
Guides & FixesFix Vitest 5 Cannot Find Module vitest/reportersFix Vitest 5's module resolution failure on vitest/reporters and vitest/coverage. Vitest 5 removes eight subpath imports; use vitest/node instead.Aug 13, 2026Read more →
Guides & FixesFix Vitest 5 clearMocks Breaking Mock StateFix Vitest 5's clearMocks: true default wiping mock call history between tests, and decide whether to restore it or fix the test.Aug 13, 2026Read more →
Guides & FixesFix Vitest 5 Config Not Found in Parent DirectoryFix Vitest 5 no longer finding a vitest.config.ts in a parent directory when run from a subdirectory. Pass --config explicitly.Aug 13, 2026Read more →
Guides & FixesFix Vitest 5 expect.poll Timeout ErrorVitest 5 throws 'expect.poll() function didn't resolve in time.' on timeout instead of letting a late result pass. Here's the fix.Aug 13, 2026Read more →
Guides & FixesFix Vitest 5 Projects Not Inheriting Root ConfigVitest 5's extends option defaults to true, so inline test.projects now inherit root plugins and setupFiles automatically. Fix it with extends: false.Aug 13, 2026Read more →
Guides & FixesFix Vitest 5 test.sequential Removed ErrorFix Vitest 5 removing test.sequential, describe.sequential, and the sequential option. Replace them with concurrent: false.Aug 13, 2026Read more →
Guides & FixesFix Vitest 5 toThrow('') Silently Passing TestsVitest 5 changes toThrow('') to match any thrown error, not just an empty message. Fix the silent false-pass with toThrow(/^$/) or toThrow().Aug 13, 2026Read more →
Guides & FixesFix Vitest 5 Unawaited Async Assertion ErrorVitest 5 fails tests outright on an unawaited async assertion instead of just warning. Here's why, and the one-line fix.Aug 13, 2026Read more →
Guides & FixesFix Vitest 5 vi.mock Top-Level Scope ErrorFix Vitest 5's "defined outside of the module's top level scope" error thrown by vi.mock, vi.unmock, and vi.hoisted.Aug 13, 2026Read more →
Guides & FixesVitest 5.0 Beta Breaking Changes: Full GuideVitest 5.0 beta ships 10 breaking changes across mocking, config, and assertions. Full rundown, sourced to the official migration guide, plus fixes.Aug 13, 2026Read more →