fix(runtime): handle expected exitCode rejection after terminating timed out test processes
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user