diff --git a/test/integration/pick-tests.js b/test/integration/pick-tests.js index 4012bcd..f8f1463 100644 --- a/test/integration/pick-tests.js +++ b/test/integration/pick-tests.js @@ -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); +}); diff --git a/test/integration/scratch-tests.js b/test/integration/scratch-tests.js index bad0774..c67e559 100644 --- a/test/integration/scratch-tests.js +++ b/test/integration/scratch-tests.js @@ -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); +});