Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
khoaHyh committed Mar 25, 2024
1 parent cf69df1 commit b905d21
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
Empty file modified bin/mocha.js
100755 → 100644
Empty file.
6 changes: 2 additions & 4 deletions lib/cli/run-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,7 @@ const singleRun = async (mocha, {exit}, fileCollectParams) => {
'No test file(s) found with the given pattern, exiting with code 1'
);

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

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

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

debug(
Expand Down
1 change: 0 additions & 1 deletion lib/cli/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const {
createInvalidArgumentValueError,
createMissingArgumentError
} = require('../errors');
const {NO_FILES_MATCH_PATTERN} = require('../errors').constants;

const {
list,
Expand Down

0 comments on commit b905d21

Please sign in to comment.