Skip to content

Commit

Permalink
exit mocha immediately on missing file
Browse files Browse the repository at this point in the history
  • Loading branch information
khoaHyh committed Mar 25, 2024
1 parent b905d21 commit ea092be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/cli/run-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ const singleRun = async (mocha, {exit}, fileCollectParams) => {
'No test file(s) found with the given pattern, exiting with code 1'
);

return mocha.run(exit ? exitMocha(1) : exitMochaLater(1));
return mocha.run(exitMocha(1));
}

debug('single run with %d file(s)', fileCollectionObj.files.length);
Expand Down Expand Up @@ -167,7 +167,7 @@ const parallelRun = async (mocha, options, fileCollectParams) => {
'No test file(s) found with the given pattern, exiting with code 1'
);

return mocha.run(exit ? exitMocha(1) : exitMochaLater(1));
return mocha.run(exitMocha(1));
}

debug(
Expand Down

0 comments on commit ea092be

Please sign in to comment.