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

Method constructor

src/__tests__/render.js:36–40  ·  view source on GitHub ↗
(...args)

Source from the content-addressed store, hash-verified

34 test('works great with react portals', () => {
35 class MyPortal extends React.Component {
36 constructor(...args) {
37 super(...args)
38 this.portalNode = document.createElement('div')
39 this.portalNode.dataset.testid = 'my-portal'
40 }
41 componentDidMount() {
42 document.body.appendChild(this.portalNode)
43 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected