global() — react Function Reference
Architecture documentation for the global() function in setupTests.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD e036e628_de2b_8ed0_82ee_ffcc4e5c1803["global()"] 5a69f06e_7407_580a_656c_583840aeeae4["setupTests.js"] e036e628_de2b_8ed0_82ee_ffcc4e5c1803 -->|defined in| 5a69f06e_7407_580a_656c_583840aeeae4 style e036e628_de2b_8ed0_82ee_ffcc4e5c1803 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
scripts/jest/spec-equivalence-reporter/setupTests.js lines 22–28
global.spyOn = function () {
throw new Error(
'Do not use spyOn(). ' +
'It can accidentally hide unexpected errors in production builds. ' +
'Use spyOnDev(), spyOnProd(), or spyOnDevAndProd() instead.'
);
};
Domain
Subdomains
Source
Frequently Asked Questions
What does global() do?
global() is a function in the react codebase, defined in scripts/jest/spec-equivalence-reporter/setupTests.js.
Where is global() defined?
global() is defined in scripts/jest/spec-equivalence-reporter/setupTests.js at line 22.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free