Skip to content

Commit

Permalink
update pending logic to closely mimic previous behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
boneskull committed Jun 10, 2016
1 parent 22dbad7 commit 4f2e454
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions lib/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,13 @@ Runner.prototype.hook = function(name, fn) {
}
if (err) {
if (err instanceof Pending) {
self.test.pending = true;
console.log(self.test);
if (name === 'beforeEach' || name === 'afterEach') {
self.test.pending = true;
} else {
suite.tests.forEach(function(test) {
test.pending = true;
});
}
} else {
self.failHook(hook, err);

Expand Down Expand Up @@ -844,8 +849,8 @@ function filterLeaks(ok, globals) {
}

// in firefox
// if runner runs in an iframe, this iframe's window.getInterface method not init at first
// it is assigned in some seconds
// if runner runs in an iframe, this iframe's window.getInterface method
// not init at first it is assigned in some seconds
if (global.navigator && (/^getInterface/).test(key)) {
return false;
}
Expand Down

0 comments on commit 4f2e454

Please sign in to comment.