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

Method componentWillUnmount

src/__tests__/cleanup.js:9–12  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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} />

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected