Skip to content

Commit

Permalink
runner.js: "self.test" undefined in Browser (#3835)
Browse files Browse the repository at this point in the history
  • Loading branch information
juergba committed Mar 14, 2019
1 parent 0098147 commit ade8b90
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/runner.js
Expand Up @@ -389,7 +389,9 @@ Runner.prototype.hook = function(name, fn) {
if (err) {
if (err instanceof Pending) {
if (name === HOOK_TYPE_BEFORE_EACH || name === HOOK_TYPE_AFTER_EACH) {
self.test.pending = true;
if (self.test) {
self.test.pending = true;
}
} else {
suite.tests.forEach(function(test) {
test.pending = true;
Expand Down

0 comments on commit ade8b90

Please sign in to comment.