mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-05-31 07:11:00 +02:00
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:
commit
e7f951dc1b
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user