toMatchRenderedOutput() — react Function Reference
Architecture documentation for the toMatchRenderedOutput() function in reactTestMatchers.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD f3ad2071_7f80_3c3f_e70a_c9e904102f8c["toMatchRenderedOutput()"] 4915c19a_277d_b145_c4ab_c2d06571f83a["reactTestMatchers.js"] f3ad2071_7f80_3c3f_e70a_c9e904102f8c -->|defined in| 4915c19a_277d_b145_c4ab_c2d06571f83a 55e1c776_6c3f_2328_2952_ca217ac9b8a3["assertYieldsWereCleared()"] f3ad2071_7f80_3c3f_e70a_c9e904102f8c -->|calls| 55e1c776_6c3f_2328_2952_ca217ac9b8a3 5d2f3fbb_97dd_b9b9_8a27_00b58c33d412["captureAssertion()"] f3ad2071_7f80_3c3f_e70a_c9e904102f8c -->|calls| 5d2f3fbb_97dd_b9b9_8a27_00b58c33d412 style f3ad2071_7f80_3c3f_e70a_c9e904102f8c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
scripts/jest/matchers/reactTestMatchers.js lines 35–44
function toMatchRenderedOutput(ReactNoop, expectedJSX) {
if (typeof ReactNoop.getChildrenAsJSX === 'function') {
const Scheduler = ReactNoop._Scheduler;
assertYieldsWereCleared(Scheduler, toMatchRenderedOutput);
return captureAssertion(() => {
expect(ReactNoop.getChildrenAsJSX()).toEqual(expectedJSX);
});
}
return JestReact.unstable_toMatchRenderedOutput(ReactNoop, expectedJSX);
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does toMatchRenderedOutput() do?
toMatchRenderedOutput() is a function in the react codebase, defined in scripts/jest/matchers/reactTestMatchers.js.
Where is toMatchRenderedOutput() defined?
toMatchRenderedOutput() is defined in scripts/jest/matchers/reactTestMatchers.js at line 35.
What does toMatchRenderedOutput() call?
toMatchRenderedOutput() calls 2 function(s): assertYieldsWereCleared, captureAssertion.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free