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 authored and boneskull committed Apr 24, 2020
1 parent 27b799e commit 13e94b1
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 13e94b1

Please sign in to comment.