openvibers/openvibe.games Commits

Make test runner fail when vitest exits nonzero with all files passed

OP OpenVibers committed 3 Oct 2026 · 0c57e2094c · 1 file, +4 −1

Asked: One exact edit to test/run.js on this branch (PR #1 review finding). The script ignores vitest's own exit status: vitest can exit non-zero (an unhandled error, a signal) while its JSON report marks every file passed, and then `pnpm test` exits 0. Replace the last line of test/run.js, which is curre…
Harness job task-Games-one-exact-edit-to-140702.

Changes

ddiff --git a/test/run.js b/test/run.js
iindex c1263b0..b43f319 100644
---- a/test/run.js
++++ b/test/run.js
@@@ -192,4 +192,7 @@ for (const f of chosen) {
tails.push(`── ${f} (exit 1) ──\n${detail}`)
}
for (const tail of tails) console.log(`\n${tail}`)
--process.exit(bad ? 1 : 0)
++if (!bad && r.status !== 0) {
++ console.log(`\n── vitest exited ${r.status ?? r.signal} although every file passed ──\n${vitestOut.split('\n').slice(-30).join('\n')}`)
++}
++process.exit(bad || r.status !== 0 ? 1 : 0)