Skip to content

Commit

Permalink
Merge pull request #212 from gemini-testing/fix/afterEach
Browse files Browse the repository at this point in the history
fix: afterEach hook error overwrites original test error
  • Loading branch information
j0tunn authored Jan 27, 2018
2 parents d88330e + d29f549 commit 9171e82
Show file tree
Hide file tree
Showing 3 changed files with 264 additions and 56 deletions.
2 changes: 1 addition & 1 deletion lib/worker/runner/mocha-runner/mocha-adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ module.exports = class MochaAdapter extends EventEmitter {

const defer = q.defer();

this.on(RunnerEvents.ERROR, (err) => this._fail = err);
this.on(RunnerEvents.ERROR, (err) => this._fail = this._fail || err);
this.on(RunnerEvents.TEST_FAIL, (data) => this._fail = data.err);
this._errMonitor.on('err', (err) => defer.reject(err));

Expand Down
Loading

0 comments on commit 9171e82

Please sign in to comment.