Skip to content

Commit b905d21

Browse files
committed
clean up
1 parent cf69df1 commit b905d21

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

bin/mocha.js

100755100644
File mode changed.

lib/cli/run-helpers.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,7 @@ const singleRun = async (mocha, {exit}, fileCollectParams) => {
130130
'No test file(s) found with the given pattern, exiting with code 1'
131131
);
132132

133-
process.exitCode = 1;
134-
return mocha.run(exit ? exitMocha : exitMochaLater);
133+
return mocha.run(exit ? exitMocha(1) : exitMochaLater(1));
135134
}
136135

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

171-
process.exitCode = 1;
172-
return mocha.run(exit ? exitMocha : exitMochaLater);
170+
return mocha.run(exit ? exitMocha(1) : exitMochaLater(1));
173171
}
174172

175173
debug(

lib/cli/run.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ const {
1515
createInvalidArgumentValueError,
1616
createMissingArgumentError
1717
} = require('../errors');
18-
const {NO_FILES_MATCH_PATTERN} = require('../errors').constants;
1918

2019
const {
2120
list,

0 commit comments

Comments
 (0)