MCPcopy
hub / github.com/facebook/react / toMatchRenderedOutput

Function toMatchRenderedOutput

scripts/jest/matchers/reactTestMatchers.js:35–44  ·  view source on GitHub ↗
(ReactNoop, expectedJSX)

Source from the content-addressed store, hash-verified

33}
34
35function toMatchRenderedOutput(ReactNoop, expectedJSX) {
36 if (typeof ReactNoop.getChildrenAsJSX === 'function') {
37 const Scheduler = ReactNoop._Scheduler;
38 assertYieldsWereCleared(Scheduler, toMatchRenderedOutput);
39 return captureAssertion(() => {
40 expect(ReactNoop.getChildrenAsJSX()).toEqual(expectedJSX);
41 });
42 }
43 return JestReact.unstable_toMatchRenderedOutput(ReactNoop, expectedJSX);
44}
45
46module.exports = {
47 toMatchRenderedOutput,

Callers

nothing calls this directly

Calls 3

assertYieldsWereClearedFunction · 0.70
captureAssertionFunction · 0.70
toEqualMethod · 0.65

Tested by

no test coverage detected