()
| 239 | let globalTestOptions; |
| 240 | |
| 241 | function parseCommandLine() { |
| 242 | if (globalTestOptions) { |
| 243 | return globalTestOptions; |
| 244 | } |
| 245 | |
| 246 | const isTestRunner = getOptionValue('--test'); |
| 247 | const coverage = getOptionValue('--experimental-test-coverage'); |
| 248 | const forceExit = getOptionValue('--test-force-exit'); |
| 249 | const sourceMaps = getOptionValue('--enable-source-maps'); |
| 250 | const updateSnapshots = getOptionValue('--test-update-snapshots'); |
| 251 | const watch = getOptionValue('--watch'); |
| 252 | const timeout = getOptionValue('--test-timeout') || Infinity; |
| 253 | let randomize = getOptionValue('--test-randomize'); |
| 254 | const hasRandomSeedOption = getOptionValue('[has_test_random_seed]'); |
| 255 | const randomSeedOption = getOptionValue('--test-random-seed'); |
| 256 | let randomSeed; |
| 257 | const rerunFailuresFilePath = getOptionValue('--test-rerun-failures'); |
| 258 | const isChildProcess = process.env.NODE_TEST_CONTEXT === 'child'; |
| 259 | const isChildProcessV8 = process.env.NODE_TEST_CONTEXT === 'child-v8'; |
| 260 | let globalSetupPath; |
| 261 | let concurrency; |
| 262 | let coverageExcludeGlobs; |
| 263 | let coverageIncludeGlobs; |
| 264 | let lineCoverage; |
| 265 | let branchCoverage; |
| 266 | let functionCoverage; |
| 267 | let destinations; |
| 268 | let isolation; |
| 269 | let only = getOptionValue('--test-only'); |
| 270 | let reporters; |
| 271 | let shard; |
| 272 | let testNamePatterns = mapPatternFlagToRegExArray('--test-name-pattern'); |
| 273 | let testSkipPatterns = mapPatternFlagToRegExArray('--test-skip-pattern'); |
| 274 | let testTagFilters = null; |
| 275 | let testTagFilterExpressions = null; |
| 276 | |
| 277 | if (isChildProcessV8) { |
| 278 | kBuiltinReporters.set('v8-serializer', 'internal/test_runner/reporter/v8-serializer'); |
| 279 | reporters = ['v8-serializer']; |
| 280 | destinations = [kDefaultDestination]; |
| 281 | } else if (isChildProcess) { |
| 282 | reporters = ['tap']; |
| 283 | destinations = [kDefaultDestination]; |
| 284 | } else { |
| 285 | destinations = getOptionValue('--test-reporter-destination'); |
| 286 | reporters = getOptionValue('--test-reporter'); |
| 287 | globalSetupPath = getOptionValue('--test-global-setup'); |
| 288 | if (reporters.length === 0 && destinations.length === 0) { |
| 289 | ArrayPrototypePush(reporters, kDefaultReporter); |
| 290 | } |
| 291 | |
| 292 | if (reporters.length === 1 && destinations.length === 0) { |
| 293 | ArrayPrototypePush(destinations, kDefaultDestination); |
| 294 | } |
| 295 | |
| 296 | if (destinations.length !== reporters.length) { |
| 297 | throw new ERR_INVALID_ARG_VALUE( |
| 298 | '--test-reporter', |
no test coverage detected
searching dependent graphs…