MCPcopy Index your code
hub / github.com/nodejs/node / setupFailureStateFile

Function setupFailureStateFile

lib/internal/test_runner/harness.js:213–230  ·  view source on GitHub ↗
(rootTest, globalOptions)

Source from the content-addressed store, hash-verified

211}
212
213function setupFailureStateFile(rootTest, globalOptions) {
214 if (!globalOptions.rerunFailuresFilePath) {
215 return;
216 }
217 rootTest.harness.previousRuns = parsePreviousRuns(globalOptions.rerunFailuresFilePath);
218 if (rootTest.harness.previousRuns === null) {
219 rootTest.diagnostic(`Warning: The rerun failures file at ` +
220 `${globalOptions.rerunFailuresFilePath} is not a valid rerun file. ` +
221 'The test runner will not be able to rerun failed tests.');
222 rootTest.harness.success = false;
223 process.exitCode = kGenericUserError;
224 return;
225 }
226 if (!process.env.NODE_TEST_CONTEXT) {
227 const reporter = reportReruns(rootTest.harness.previousRuns, globalOptions);
228 compose(rootTest.reporter, reporter).pipe(new PassThrough());
229 }
230}
231
232function setupProcessState(root, globalOptions) {
233 const hook = createHook({

Callers 1

setupProcessStateFunction · 0.85

Calls 4

parsePreviousRunsFunction · 0.85
reportRerunsFunction · 0.85
composeFunction · 0.85
diagnosticMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…