Skip to content

Commit

Permalink
fix when errSuite is undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
juergba committed Jan 23, 2020
1 parent c0f1d14 commit 77ea689
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/runner.js
Expand Up @@ -654,7 +654,7 @@ Runner.prototype.runTests = function(suite, fn) {
self.emit(constants.EVENT_TEST_END, test);
// skip inner afterEach hooks below errSuite level
var origSuite = self.suite;
self.suite = errSuite;
self.suite = errSuite || self.suite;
return self.hookUp(HOOK_TYPE_AFTER_EACH, function(e, eSuite) {
self.suite = origSuite;
next(e, eSuite);
Expand Down

0 comments on commit 77ea689

Please sign in to comment.