From: Laurent Mazet Date: Sat, 25 Jul 2026 21:30:35 +0000 (+0200) Subject: code cleaning X-Git-Url: https://secure.softndesign.org/git/?a=commitdiff_plain;h=bea16fcc665f67e3bff1f5e35c73285c20449250;p=trivabble.git code cleaning --- 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; } }());