Home / Function/ getJestAliases() — react Function Reference

getJestAliases() — react Function Reference

Architecture documentation for the getJestAliases() function in modules.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  9ff1a0bf_ec73_a602_8777_4119d78515a0["getJestAliases()"]
  b6a11056_3d6d_cb05_84d6_323c82d395a3["modules.js"]
  9ff1a0bf_ec73_a602_8777_4119d78515a0 -->|defined in| b6a11056_3d6d_cb05_84d6_323c82d395a3
  831d1d12_35bd_bd87_0f11_8537b00e2357["getModules()"]
  831d1d12_35bd_bd87_0f11_8537b00e2357 -->|calls| 9ff1a0bf_ec73_a602_8777_4119d78515a0
  style 9ff1a0bf_ec73_a602_8777_4119d78515a0 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

fixtures/flight/config/modules.js lines 78–92

function getJestAliases(options = {}) {
  const baseUrl = options.baseUrl;

  if (!baseUrl) {
    return {};
  }

  const baseUrlResolved = path.resolve(paths.appPath, baseUrl);

  if (path.relative(paths.appPath, baseUrlResolved) === '') {
    return {
      '^src/(.*)$': '<rootDir>/src/$1',
    };
  }
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does getJestAliases() do?
getJestAliases() is a function in the react codebase, defined in fixtures/flight/config/modules.js.
Where is getJestAliases() defined?
getJestAliases() is defined in fixtures/flight/config/modules.js at line 78.
What calls getJestAliases()?
getJestAliases() is called by 1 function(s): getModules.

Analyze Your Own Codebase

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

Try Supermodel Free