Skip to content

Commit

Permalink
fix mocha exitCode issue nightwatchjs#3001
Browse files Browse the repository at this point in the history
  • Loading branch information
swrdfish committed Mar 25, 2022
1 parent 545f40c commit 6bc04f6
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 6bc04f6

Please sign in to comment.