jsonChildToJSXChild() — react Function Reference
Architecture documentation for the jsonChildToJSXChild() function in JestReact.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 825f3274_7f61_8309_ad58_ab8424a4b063["jsonChildToJSXChild()"] 6e8c1123_cee1_9b1d_49c3_11cbcce7cb2e["JestReact.js"] 825f3274_7f61_8309_ad58_ab8424a4b063 -->|defined in| 6e8c1123_cee1_9b1d_49c3_11cbcce7cb2e 02ba167f_fe6e_f314_15bd_26d5552907e9["unstable_toMatchRenderedOutput()"] 02ba167f_fe6e_f314_15bd_26d5552907e9 -->|calls| 825f3274_7f61_8309_ad58_ab8424a4b063 57be722b_59e4_4765_8d23_a700ab4dc173["jsonChildrenToJSXChildren()"] 57be722b_59e4_4765_8d23_a700ab4dc173 -->|calls| 825f3274_7f61_8309_ad58_ab8424a4b063 57be722b_59e4_4765_8d23_a700ab4dc173["jsonChildrenToJSXChildren()"] 825f3274_7f61_8309_ad58_ab8424a4b063 -->|calls| 57be722b_59e4_4765_8d23_a700ab4dc173 35bb813c_b5a5_b08c_6f38_adf936445607["createJSXElementForTestComparison()"] 825f3274_7f61_8309_ad58_ab8424a4b063 -->|calls| 35bb813c_b5a5_b08c_6f38_adf936445607 style 825f3274_7f61_8309_ad58_ab8424a4b063 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/jest-react/src/JestReact.js lines 100–112
function jsonChildToJSXChild(jsonChild) {
if (jsonChild === null || typeof jsonChild === 'string') {
return jsonChild;
} else {
const jsxChildren = jsonChildrenToJSXChildren(jsonChild.children);
return createJSXElementForTestComparison(
jsonChild.type,
jsxChildren === null
? jsonChild.props
: {...jsonChild.props, children: jsxChildren},
);
}
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does jsonChildToJSXChild() do?
jsonChildToJSXChild() is a function in the react codebase, defined in packages/jest-react/src/JestReact.js.
Where is jsonChildToJSXChild() defined?
jsonChildToJSXChild() is defined in packages/jest-react/src/JestReact.js at line 100.
What does jsonChildToJSXChild() call?
jsonChildToJSXChild() calls 2 function(s): createJSXElementForTestComparison, jsonChildrenToJSXChildren.
What calls jsonChildToJSXChild()?
jsonChildToJSXChild() is called by 2 function(s): jsonChildrenToJSXChildren, unstable_toMatchRenderedOutput.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free