Merge pull request #21357 from timvandermeij/fix-browser-test-exit-code

Fix missing non-zero exit code for failure cases in `test.mjs`
This commit is contained in:
Tim van der Meij 2026-05-29 20:23:22 +02:00 committed by GitHub
commit e7f951dc1b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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);
}
}