You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Startup errors are hidden behind 'No test files found' and a charCodeAt crash (Vitest 5.0.5 + Vite 8.3.5) #611
With the repository's pinned Vitest 5.0.5 and Vite 8.3.5, an error thrown at startup (for example in a globalSetup) is reported as No test files found, even when test files exist. It's followed by a crash while the error is printed, so the real error never appears:
No test files found, exiting with code 1
⎯⎯⎯⎯⎯⎯⎯ Startup Error ⎯⎯⎯⎯⎯⎯⎯⎯
TypeError: code.charCodeAt is not a function
at extractInlineSourceMap (vite/dist/node/module-runner.js)
at EvaluatedModules.getModuleSourceMapById
This is a Vitest bug, not ours. It reproduces without vitest-native, in an empty directory:
// vitest.config.mjsexportdefault{test: {include: ["*.check.js"],globalSetup: ["./gs.mjs"]}};// gs.mjsexportfunctionsetup(){thrownewError("boom from global setup");}// a.check.jstest("x",()=>{});
Running vitest run prints the output above, and "boom from global setup" is never shown.
Cause:vitest-dev/vitest#11682. Vitest's server module runner read cached modules as a Buffer, and Vite 8.3.5 calls code.charCodeAt on them. It's fixed by vitest-dev/vitest#11709, which shipped in Vitest 5.1.0 (published 2026-11-02).
Here: the native suite's dispatch-fixtures race produced exactly this (fixed separately in #610), and the crash is what made it hard to diagnose.
To do: bump the pinned Vitest to 5.1.0. The repository's 7-day minimum release age allows it from 2026-11-09, and the version change needs approval like any dependency change. Then confirm that the reproduction above prints the global setup's error.
Approved: bump the pinned Vitest (and matching @vitest/* packages) from 5.0.5 to 5.1.0 on or after 2026-11-09 16:13 UTC, when the 7-day release-age gate allows it. Under the upstream policy proposal (#613), 5.1.0 becomes the recommended floor for Vitest 5: a startup warning and a doctor entry naming vitest-dev/vitest#11682. The hard floor stays 5.0.0.
Activity
danfry1 commentedon Nov 6, 2026
Approved: bump the pinned Vitest (and matching @vitest/* packages) from 5.0.5 to 5.1.0 on or after 2026-11-09 16:13 UTC, when the 7-day release-age gate allows it. Under the upstream policy proposal (#613), 5.1.0 becomes the recommended floor for Vitest 5: a startup warning and a doctor entry naming vitest-dev/vitest#11682. The hard floor stays 5.0.0.