Skip to content

Commit

Permalink
Add mocha exit with failure count
Browse files Browse the repository at this point in the history
  • Loading branch information
nazarhussain committed Oct 4, 2023
1 parent a495e37 commit d7b654b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/mocha/mocha_run.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ async function exitScenarioHandler(code) {

// Process does not seems to exit with one `process.exit(-1)`, so we try a few times
for (let i = 0; i < 5; i++) {
process.exit(-1);
// If there are some failures in the test, we exit with -1
process.exit(code > 0 ? -1 : 0);
await sleep(100);
}

Expand Down

0 comments on commit d7b654b

Please sign in to comment.