Skip to content

Commit

Permalink
type check before calling retriedTest()
Browse files Browse the repository at this point in the history
  • Loading branch information
juergba committed Apr 25, 2020
1 parent eba6ec7 commit e659027
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/runner.js
Expand Up @@ -134,7 +134,7 @@ function Runner(suite, delay) {
this.total = suite.total();
this.failures = 0;
this.on(constants.EVENT_TEST_END, function(test) {
if (test.retriedTest() && test.parent) {
if (test.type === 'test' && test.retriedTest() && test.parent) {
var idx =
test.parent.tests && test.parent.tests.indexOf(test.retriedTest());
if (idx > -1) test.parent.tests[idx] = test;
Expand Down

0 comments on commit e659027

Please sign in to comment.