Skip to content

armgit / ECC

Public Imported from GitHub
0

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

test(observer-status): set process.exitCode so the summary always flushes

Nguyen Thanh Date3ab97915fc7
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();