diff --git a/tests/skills/observer-status-instinct-count.test.js b/tests/skills/observer-status-instinct-count.test.js index 223c40325..d65a850ca 100644 --- a/tests/skills/observer-status-instinct-count.test.js +++ b/tests/skills/observer-status-instinct-count.test.js @@ -204,7 +204,10 @@ function main() { console.log(`\n Passed: ${passed}`); console.log(` Failed: ${failed}`); - if (failed > 0) process.exit(1); + // exitCode, not exit(1): stdout is async when it is a pipe, which is how + // tests/run-all.js runs this, and process.exit() does not wait for pending + // writes — it could drop the two lines above, which the aggregator totals. + if (failed > 0) process.exitCode = 1; } main();