browser-test: exit(1) when test failed

This commit is contained in:
Johannes Rieken 2020-02-06 16:39:40 +01:00
parent feba899d30
commit 21b671d921

View file

@ -195,11 +195,15 @@ testModules.then(async modules => {
const promises = browserTypes.map(browserType => runTestsInBrowser(modules, browserType));
const messages = await Promise.all(promises);
// aftermath
let didFail = false;
for (let msg of messages) {
if (msg) {
didFail = true;
console.log(msg);
}
}
process.exit(didFail ? 1 : 0);
}).catch(err => {
console.error(err);