Skip to content

Commit b3a9174

Browse files
committed
Conditionally repopulate internal spec properties
Doesn't mean a lot, but why not.
1 parent 6c81d49 commit b3a9174

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

lib/browser-runtime.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,10 +1023,12 @@ function afterEachHandler(this: Mocha.Context, context: CompositionContext) {
10231023
/**
10241024
* Repopulate internal properties in case previous test is retried.
10251025
*/
1026-
updateInternalSpecProperties({
1027-
testCaseStartedId: context.newId(),
1028-
remainingSteps: [...properties.allSteps],
1029-
});
1026+
if (willBeRetried) {
1027+
updateInternalSpecProperties({
1028+
testCaseStartedId: context.newId(),
1029+
remainingSteps: [...properties.allSteps],
1030+
});
1031+
}
10301032
}
10311033

10321034
function afterHandler(this: Mocha.Context, context: CompositionContext) {
@@ -1039,6 +1041,7 @@ function afterHandler(this: Mocha.Context, context: CompositionContext) {
10391041
});
10401042
}
10411043
}
1044+
10421045
export default function createTests(
10431046
registry: Registry,
10441047
seed: number,

0 commit comments

Comments
 (0)