From bea16fcc665f67e3bff1f5e35c73285c20449250 Mon Sep 17 00:00:00 2001 From: Laurent Mazet Date: Sat, 25 Jul 2026 23:30:35 +0200 Subject: [PATCH] code cleaning --- test/test-runner.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/test/test-runner.js b/test/test-runner.js index 6ace1ee..758ad26 100644 --- a/test/test-runner.js +++ b/test/test-runner.js @@ -15,6 +15,7 @@ const sections = [ ]; (async function main() { + process.exitCode = 1; try { for (const section of sections) { const exitCode = await new Promise((resolve, reject) => { @@ -27,16 +28,12 @@ const sections = [ child.on("exit", (code) => resolve(code === null ? 1 : code)); }); - if (exitCode !== 0) { - process.exitCode = exitCode; - return; - } + if (exitCode !== 0) return; } log(green("All tests passed.")); process.exitCode = 0; } catch (error) { console.error(error && error.stack ? error.stack : error); - process.exitCode = 1; } }()); -- 2.30.2