Unbounded Vite Version Override Silently Killed 71-File Vitest Test Suite
A developer discovered that all 71 test files in their project were reporting 'No test suite found in file' after pnpm test ran, with zero tests executing and a non-zero exit code. The root cause was a pnpm-workspace.yaml override set four months earlier to patch security vulnerabilities, which specified vite: '>=6.4.3' — an open-ended range with no upper bound. Because overrides bypass peer dependency checks, the resolver pulled in Vite 8.1.4, which vitest 3.2.7 does not support, as its declared peer range covers only ^5, ^6, or ^7. Vite 8 migrated its transform pipeline to rolldown/oxc and changed the module-runner contract, causing vitest to load all test files but receive no suites back. The fix was capping the override below version 8, with the recommendation to treat zero-suite test runs as failures and always verify peer ranges before applying dependency overrides.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in