code cleaning
authorLaurent Mazet <mazet@softndesign.org>
Sat, 25 Jul 2026 21:30:35 +0000 (23:30 +0200)
committerLaurent Mazet <mazet@softndesign.org>
Tue, 11 Aug 2026 20:26:57 +0000 (22:26 +0200)
test/test-runner.js

index 6ace1ee9ec499fa660ba52d65757a00cc7d03552..758ad26de459e96b02e6815b39496a915e82f830 100644 (file)
@@ -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;
     }
 }());