diff --git a/changelog.md b/changelog.md index 5587d62..e95d24c 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,11 @@ # Changelog +## 2026-03-23 - 3.5.1 - fix(runtime) +handle expected exitCode rejection after terminating timed out test processes + +- swallow the child process exitCode rejection triggered by timeout termination +- reduce unhandled rejection noise when test files exceed the configured timeout + ## 2026-03-19 - 3.5.0 - feat(tstest) add support for package.json before scripts during test execution diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index 7443d51..724f648 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@git.zone/tstest', - version: '3.5.0', + version: '3.5.1', description: 'A powerful, modern test runner for TypeScript with multi-runtime support (Node.js, Deno, Bun, Chromium) and a batteries-included test framework.' } diff --git a/ts/tstest.classes.runtime.node.ts b/ts/tstest.classes.runtime.node.ts index ed94689..7ac4dba 100644 --- a/ts/tstest.classes.runtime.node.ts +++ b/ts/tstest.classes.runtime.node.ts @@ -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); });