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 22, 2020
1 parent 9c10ada commit 1c95df1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/runner.js
Original file line number Diff line number Diff line change
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 1c95df1

Please sign in to comment.