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

Function Component

src/__tests__/render.js:140–143  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

138
139 const spy = jest.fn()
140 function Component() {
141 spy()
142 return null
143 }
144
145 render(<Component />)
146 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…