MCPcopy
hub / github.com/jestjs/jest / rerunTest

Function rerunTest

packages/jest-circus/src/run.ts:110–124  ·  view source on GitHub ↗
(test: Circus.TestEntry)

Source from the content-addressed store, hash-verified

108 const children = regroupConcurrentChildren(describeBlock.children);
109
110 const rerunTest = async (test: Circus.TestEntry) => {
111 let numRetriesAvailable = retryTimes;
112
113 while (numRetriesAvailable > 0 && test.errors.length > 0) {
114 // Clear errors so retries occur
115 await dispatch({name: 'test_retry', test});
116
117 if (waitBeforeRetry > 0) {
118 await new Promise(resolve => setTimeout(resolve, waitBeforeRetry));
119 }
120
121 await _runTest(test, isSkipped);
122 numRetriesAvailable--;
123 }
124 };
125
126 const handleRetry = async (
127 test: Circus.TestEntry,

Callers 2

handleRetryFunction · 0.85

Calls 2

dispatchFunction · 0.90
_runTestFunction · 0.85

Tested by

no test coverage detected