getEnvars() — react Function Reference
Architecture documentation for the getEnvars() function in jest-cli.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 52eba91c_e2ab_7660_f56c_9eacedf7400e["getEnvars()"] 275b3ae7_7007_e04d_7b4e_3740a2f0eb52["jest-cli.js"] 52eba91c_e2ab_7660_f56c_9eacedf7400e -->|defined in| 275b3ae7_7007_e04d_7b4e_3740a2f0eb52 aed9173d_673b_258c_6512_6c3881464cc9["main()"] aed9173d_673b_258c_6512_6c3881464cc9 -->|calls| 52eba91c_e2ab_7660_f56c_9eacedf7400e style 52eba91c_e2ab_7660_f56c_9eacedf7400e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
scripts/jest/jest-cli.js lines 335–376
function getEnvars() {
const envars = {
NODE_ENV: argv.env || 'development',
RELEASE_CHANNEL: argv.releaseChannel.match(/modern|experimental/)
? 'experimental'
: 'stable',
// Pass this flag through to the config environment
// so the base config can conditionally load the console setup file.
compactConsole: argv.compactConsole,
};
if (argv.prod) {
envars.NODE_ENV = 'production';
}
if (argv.dev) {
envars.NODE_ENV = 'development';
}
if (argv.variant) {
envars.VARIANT = true;
}
if (argv.reactVersion) {
envars.REACT_VERSION = semver.coerce(argv.reactVersion);
}
if (argv.sourceMaps) {
// This is off by default because it slows down the test runner, but it's
// super useful when running the debugger.
envars.JEST_ENABLE_SOURCE_MAPS = 'inline';
}
if (argv.silent) {
// Enable dot output for jest-silent-reporter so that long test runs
// show progress and don't appear to be hung.
envars.JEST_SILENT_REPORTER_DOTS = true;
}
return envars;
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does getEnvars() do?
getEnvars() is a function in the react codebase, defined in scripts/jest/jest-cli.js.
Where is getEnvars() defined?
getEnvars() is defined in scripts/jest/jest-cli.js at line 335.
What calls getEnvars()?
getEnvars() 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