From 8d5fe521b39baeaf589e460d6bc5f1a75704a157 Mon Sep 17 00:00:00 2001 From: Tim van der Meij Date: Fri, 29 May 2026 19:16:17 +0200 Subject: [PATCH] Fix missing non-zero exit code for failure cases in `test.mjs` The two affected code paths caught and logged errors, but that wasn't reflected in the exit code of the process, and that is what GitHub Actions (and other tools) to determine if process execution was successful or not. This commit fixes the issue by making sure we consistently exit with code 1 in case of errors so that GitHub Actions pipelines correctly reflect the outcome of the test run. --- test/test.mjs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/test.mjs b/test/test.mjs index 50e07eeba..abc0fceb2 100644 --- a/test/test.mjs +++ b/test/test.mjs @@ -1148,6 +1148,7 @@ async function startBrowsers({ baseUrl, initializeSession, numSessions = 1 }) { }) .catch(function (ex) { console.log(`Error while starting ${browserName}: ${ex.message}`); + session.numErrors = 1; closeSession(sessionName); }); } @@ -1395,6 +1396,7 @@ async function main() { // because the teardown logic of the tests did not get a chance to run. console.error(e); await Promise.all(sessions.map(session => closeSession(session.name))); + process.exit(1); } }