MCPcopy
hub / github.com/Semantic-Org/Semantic-UI-React / wrapperMount

Function wrapperMount

test/specs/modules/Dropdown/Dropdown-test.js:25–31  ·  view source on GitHub ↗
(node, opts)

Source from the content-addressed store, hash-verified

23// we need to unmount the dropdown after every test to ensure all event listeners are cleaned up
24// wrap the render methods to update a global wrapper that is unmounted after each test
25const wrapperMount = (node, opts) => {
26 attachTo = document.createElement('div')
27 document.body.appendChild(attachTo)
28
29 wrapper = mount(node, { ...opts, attachTo })
30 return wrapper
31}
32const wrapperShallow = (...args) => (wrapper = shallow(...args))
33const wrapperRender = (...args) => (wrapper = render(...args))
34

Callers 1

Dropdown-test.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…