Home / Function/ getCommandArgs() — react Function Reference

getCommandArgs() — react Function Reference

Architecture documentation for the getCommandArgs() function in jest-cli.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  9295d571_bfa6_f0de_389c_4c52aef9a5a4["getCommandArgs()"]
  275b3ae7_7007_e04d_7b4e_3740a2f0eb52["jest-cli.js"]
  9295d571_bfa6_f0de_389c_4c52aef9a5a4 -->|defined in| 275b3ae7_7007_e04d_7b4e_3740a2f0eb52
  aed9173d_673b_258c_6512_6c3881464cc9["main()"]
  aed9173d_673b_258c_6512_6c3881464cc9 -->|calls| 9295d571_bfa6_f0de_389c_4c52aef9a5a4
  bfafc66e_50a2_a505_8e2e_6b30d63beba4["isWWWConfig()"]
  9295d571_bfa6_f0de_389c_4c52aef9a5a4 -->|calls| bfafc66e_50a2_a505_8e2e_6b30d63beba4
  be464150_80d3_49db_bcf3_bc437653fc07["isXplatConfig()"]
  9295d571_bfa6_f0de_389c_4c52aef9a5a4 -->|calls| be464150_80d3_49db_bcf3_bc437653fc07
  7307d3dc_5201_c9eb_c8b9_aa509b1f2745["isOSSConfig()"]
  9295d571_bfa6_f0de_389c_4c52aef9a5a4 -->|calls| 7307d3dc_5201_c9eb_c8b9_aa509b1f2745
  f85f22a5_e4f5_4bd3_34a5_76c02b39a987["logError()"]
  9295d571_bfa6_f0de_389c_4c52aef9a5a4 -->|calls| f85f22a5_e4f5_4bd3_34a5_76c02b39a987
  style 9295d571_bfa6_f0de_389c_4c52aef9a5a4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

scripts/jest/jest-cli.js lines 288–333

function getCommandArgs() {
  // Add the correct Jest config.
  const args = ['./scripts/jest/jest.js', '--config'];
  if (argv.project === 'devtools') {
    args.push(devToolsConfig);
  } else if (argv.build) {
    args.push(buildConfig);
  } else if (argv.persistent) {
    args.push(persistentConfig);
  } else if (isWWWConfig()) {
    args.push(wwwConfig);
  } else if (isXplatConfig()) {
    args.push(xplatConfig);
  } else if (isOSSConfig()) {
    args.push(ossConfig);
  } else {
    // We should not get here.
    logError('Unrecognized release channel');
    process.exit(1);
  }

  // Set the debug options, if necessary.
  if (argv.debug) {
    args.unshift('--inspect-brk');
    args.push('--runInBand');

    // Prevent console logs from being hidden until test completes.
    args.push('--useStderr');
  }

  if (argv.ci === true) {
    args.push('--maxConcurrency=10');
  }

  // Use silent reporter if requested.
  if (argv.silent) {
    args.push('--reporters=jest-silent-reporter');
    args.push('--testLocationInResults');
  }

  // Push the remaining args onto the command.
  // This will send args like `--watch` to Jest.
  args.push(...argv._);

  return args;
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does getCommandArgs() do?
getCommandArgs() is a function in the react codebase, defined in scripts/jest/jest-cli.js.
Where is getCommandArgs() defined?
getCommandArgs() is defined in scripts/jest/jest-cli.js at line 288.
What does getCommandArgs() call?
getCommandArgs() calls 4 function(s): isOSSConfig, isWWWConfig, isXplatConfig, logError.
What calls getCommandArgs()?
getCommandArgs() is called by 1 function(s): main.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free