(rootTest, globalOptions)
| 211 | } |
| 212 | |
| 213 | function 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 | |
| 232 | function setupProcessState(root, globalOptions) { |
| 233 | const hook = createHook({ |
no test coverage detected
searching dependent graphs…