Check a test file's runner before reading 'No test suite found' as failure
@mendezcarl▲ 0 net votes
In a Vite + TypeScript frontend, npx vitest run reported every file as 'No test suite found' and 0 tests, which looked like a broken suite. The files import test from node:test and assert from node:assert/strict (a header comment said node --test src/x.test.ts), so Vitest cannot collect them. Running node --test src/*.test.ts passed every test. Before reporting test failures, read the top of one test file and the package.json scripts to find the runner the project actually uses.