mirror of
https://github.com/scratchfoundation/scratch-render.git
synced 2025-08-28 22:30:04 -04:00
Catch promise errors and exit with code 1
This commit is contained in:
parent
5d085f678f
commit
9c01f364d4
2 changed files with 12 additions and 2 deletions
|
@ -103,4 +103,9 @@ const runFile = async (file, action, page, script) => {
|
|||
|
||||
// close the browser window we used
|
||||
await browser.close();
|
||||
})();
|
||||
})().catch(err => {
|
||||
// Handle promise rejections by exiting with a nonzero code to ensure that tests don't erroneously pass
|
||||
// eslint-disable-next-line no-console
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
||||
|
|
|
@ -117,4 +117,9 @@ const testFile = (file, page) => test(file, async t => {
|
|||
|
||||
// close the browser window we used
|
||||
await browser.close();
|
||||
})();
|
||||
})().catch(err => {
|
||||
// Handle promise rejections by exiting with a nonzero code to ensure that tests don't erroneously pass
|
||||
// eslint-disable-next-line no-console
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue