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

Class Test

src/__tests__/cleanup.js:8–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6 const divId = 'my-div'
7
8 class Test extends React.Component {
9 componentWillUnmount() {
10 expect(document.getElementById(divId)).toBeInTheDocument()
11 spy()
12 }
13
14 render() {
15 return <div id={divId} />
16 }
17 }
18
19 render(<Test />)
20 cleanup()

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…