MCPcopy Create free account
hub / github.com/testing-library/react-testing-library / Component

Function Component

src/__tests__/rerender.js:87–90  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

85
86 const spy = jest.fn()
87 function Component() {
88 spy()
89 return null
90 }
91
92 const {rerender} = render(<Component />)
93 expect(spy).toHaveBeenCalledTimes(2)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…