From 301a12940ad65ed39310dccfab4af460a2c1660f Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Sat, 21 Mar 2026 09:56:01 -0700 Subject: [PATCH] fix: triage E2E runs both test files in subprocesses math.test.js called process.exit(1) which killed the runner before string.test.js could execute. Changed test runner to use child_process so each test runs independently and both failure classes are exercised. Co-Authored-By: Claude Opus 4.6 (1M context) --- test/skill-e2e.test.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/test/skill-e2e.test.ts b/test/skill-e2e.test.ts index 074064c9..a8c4cafc 100644 --- a/test/skill-e2e.test.ts +++ b/test/skill-e2e.test.ts @@ -2982,10 +2982,19 @@ try { } `); - // Test runner + // Test runner — each test in a subprocess so one failure doesn't kill the other fs.writeFileSync(path.join(triageDir, 'test', 'run.js'), ` -require('./math.test.js'); -require('./string.test.js'); +const { execSync } = require('child_process'); +const path = require('path'); +let failures = 0; +for (const f of ['math.test.js', 'string.test.js']) { + try { + execSync('node ' + path.join(__dirname, f), { stdio: 'inherit' }); + } catch (e) { + failures++; + } +} +if (failures > 0) process.exit(1); `); // Commit on main with the pre-existing bug