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

Function Greeting

src/__tests__/rerender.js:21–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19
20 test('rerender will re-render the element', () => {
21 const Greeting = props => <div>{props.message}</div>
22 const {container, rerender} = render(<Greeting message="hi" />)
23 expect(container.firstChild).toHaveTextContent('hi')
24 rerender(<Greeting message="hey" />)

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…