fix(runtime): handle expected exitCode rejection after terminating timed out test processes

This commit is contained in:
2026-03-23 14:40:54 +00:00
parent 8e53e5143e
commit 5563154fd9
3 changed files with 9 additions and 1 deletions

View File

@@ -184,6 +184,8 @@ import '${absoluteTestFile.replace(/\\/g, '/')}';
timeoutId = setTimeout(async () => {
// Use tsrun's terminate() to gracefully kill the process
await tsrunProcess.terminate();
// Swallow the expected rejection from the killed child process
tsrunProcess.exitCode.catch(() => {});
reject(new Error(`Test file timed out after ${this.timeoutSeconds} seconds`));
}, timeoutMs);
});