From f859d4ce44ec4f836792fa31376a8b02b1531bab Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Tue, 28 Jul 2020 20:36:35 -0700 Subject: [PATCH] test: fail tests if the spec runner promise rejects (#24762) --- spec-main/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spec-main/index.js b/spec-main/index.js index 92c0d18d5ddf..a2a80580b8c8 100644 --- a/spec-main/index.js +++ b/spec-main/index.js @@ -124,4 +124,8 @@ app.whenReady().then(async () => { chai.use(require('dirty-chai')); const runner = mocha.run(cb); +}).catch((err) => { + console.error('An error occurred while running the spec-main spec runner'); + console.error(err); + process.exit(1); });