(path, { forceExit,
inspectPort,
testNamePatterns,
testSkipPatterns,
testTagFilterExpressions,
only,
hasFiles,
testFiles,
globPatterns,
argv: suppliedArgs,
execArgv,
rerunFailuresFilePath,
randomize,
randomSeed,
root: { timeout },
cwd })
| 179 | } |
| 180 | |
| 181 | function getRunArgs(path, { forceExit, |
| 182 | inspectPort, |
| 183 | testNamePatterns, |
| 184 | testSkipPatterns, |
| 185 | testTagFilterExpressions, |
| 186 | only, |
| 187 | hasFiles, |
| 188 | testFiles, |
| 189 | globPatterns, |
| 190 | argv: suppliedArgs, |
| 191 | execArgv, |
| 192 | rerunFailuresFilePath, |
| 193 | randomize, |
| 194 | randomSeed, |
| 195 | root: { timeout }, |
| 196 | cwd }) { |
| 197 | const processNodeOptions = getOptionsAsFlagsFromBinding(); |
| 198 | const runArgs = ArrayPrototypeFilter(processNodeOptions, filterExecArgv); |
| 199 | |
| 200 | /** |
| 201 | * Node supports V8 options passed via cli. |
| 202 | * These options are being consumed by V8 and are not stored in nodeOptions. |
| 203 | * |
| 204 | * We need to propagate these options to the child processes manually. |
| 205 | * |
| 206 | * An example of such option are --allow-natives-syntax and --expose-gc |
| 207 | */ |
| 208 | const nodeOptionsSet = new SafeSet(processNodeOptions); |
| 209 | const unknownProcessExecArgv = ArrayPrototypeFilter( |
| 210 | process.execArgv, |
| 211 | (arg) => !nodeOptionsSet.has(arg), |
| 212 | ); |
| 213 | ArrayPrototypePushApply(runArgs, unknownProcessExecArgv); |
| 214 | |
| 215 | if (forceExit === true) { |
| 216 | ArrayPrototypePush(runArgs, '--test-force-exit'); |
| 217 | } |
| 218 | if (isUsingInspector()) { |
| 219 | ArrayPrototypePush(runArgs, `--inspect-port=${getInspectPort(inspectPort)}`); |
| 220 | } |
| 221 | if (testNamePatterns != null) { |
| 222 | ArrayPrototypeForEach(testNamePatterns, (pattern) => ArrayPrototypePush(runArgs, `--test-name-pattern=${pattern}`)); |
| 223 | } |
| 224 | if (testSkipPatterns != null) { |
| 225 | ArrayPrototypeForEach(testSkipPatterns, (pattern) => ArrayPrototypePush(runArgs, `--test-skip-pattern=${pattern}`)); |
| 226 | } |
| 227 | if (testTagFilterExpressions != null) { |
| 228 | ArrayPrototypeForEach(testTagFilterExpressions, (value) => ArrayPrototypePush(runArgs, `--experimental-test-tag-filter=${value}`)); |
| 229 | } |
| 230 | if (only === true) { |
| 231 | ArrayPrototypePush(runArgs, '--test-only'); |
| 232 | } |
| 233 | if (timeout != null) { |
| 234 | ArrayPrototypePush(runArgs, `--test-timeout=${timeout}`); |
| 235 | } |
| 236 | if (rerunFailuresFilePath) { |
| 237 | ArrayPrototypePush(runArgs, `--test-rerun-failures=${rerunFailuresFilePath}`); |
| 238 | } |
no test coverage detected
searching dependent graphs…