module() — react Function Reference
Architecture documentation for the module() function in makeSnapshotResolver.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 727e3497_7e26_f8bf_983d_960acf5c4908["module()"] 07cc2918_1032_e167_08c7_6fade5c6b0c6["makeSnapshotResolver.js"] 727e3497_7e26_f8bf_983d_960acf5c4908 -->|defined in| 07cc2918_1032_e167_08c7_6fade5c6b0c6 style 727e3497_7e26_f8bf_983d_960acf5c4908 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
compiler/packages/babel-plugin-react-compiler/scripts/jest/makeSnapshotResolver.js lines 8–22
module.exports = function makeSnapshotResolver(useForget) {
const modeExtension = useForget ? '.with-forget' : '.no-forget';
return {
resolveSnapshotPath: (testPath, snapshotExtension) =>
testPath + modeExtension + snapshotExtension,
resolveTestPath: (snapshotFilePath, snapshotExtension) =>
snapshotFilePath.slice(
0,
-modeExtension.length - snapshotExtension.length
),
testPathForConsistencyCheck: 'some/__tests__/example.test.js',
};
};
Domain
Subdomains
Source
Frequently Asked Questions
What does module() do?
module() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/scripts/jest/makeSnapshotResolver.js.
Where is module() defined?
module() is defined in compiler/packages/babel-plugin-react-compiler/scripts/jest/makeSnapshotResolver.js at line 8.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free