Skip to content

Commit

Permalink
fix mocha exitCode issue #3001 (#3039)
Browse files Browse the repository at this point in the history
  • Loading branch information
swrdfish authored Mar 25, 2022
1 parent 8eed942 commit cdf0705
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/runner/process-listener.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,7 @@ module.exports = class {
}

onExit(code) {
if (code > 0) {
this.setExitCode(code);
}

this.exit();
this.process.exitCode = code || this.exitCode;
}

unhandled(err) {
Expand Down Expand Up @@ -110,7 +106,7 @@ module.exports = class {

exit() {
this.process.exit && this.process.exit(this.exitCode);

return this;
}
};

0 comments on commit cdf0705

Please sign in to comment.