From 13e94b1511ff3ecbb69472f3f92ac7bf889d11a2 Mon Sep 17 00:00:00 2001 From: juergba Date: Fri, 24 Apr 2020 14:36:42 +0200 Subject: [PATCH] type check before calling retriedTest() --- lib/runner.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/runner.js b/lib/runner.js index 60b5537302..aabffda96a 100644 --- a/lib/runner.js +++ b/lib/runner.js @@ -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;