Browse Source

test: fail tests if the spec runner promise rejects (#24762)

Samuel Attard 4 years ago
parent
commit
f859d4ce44
1 changed files with 4 additions and 0 deletions
  1. 4 0
      spec-main/index.js

+ 4 - 0
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);
 });