Skip to content

Commit

Permalink
avoid double-failure conditions when using this.skip()
Browse files Browse the repository at this point in the history
  • Loading branch information
boneskull committed Sep 16, 2016
1 parent 2806dda commit e61e2c7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,10 @@ Runner.prototype.checkGlobals = function(test) {
* @param {Error} err
*/
Runner.prototype.fail = function(test, err) {
if (test.isPending()) {
return;
}

++this.failures;
test.state = 'failed';

Expand Down

0 comments on commit e61e2c7

Please sign in to comment.