MCPcopy Create free account
hub / github.com/ReactTooltip/react-tooltip / RemovableTest

Function RemovableTest

src/test/tooltip-interaction-behavior.spec.js:161–171  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

159
160 test('keeps autoUpdate wired when an active anchor is removed', async () => {
161 const RemovableTest = () => {
162 const [showAnchor, setShowAnchor] = useState(true)
163
164 return (
165 <div>
166 {showAnchor && <span data-tooltip-id="removable-test">Hover Me</span>}
167 <button onClick={() => setShowAnchor(false)}>Remove Anchor</button>
168 <TooltipController id="removable-test" content="Removable Test" />
169 </div>
170 )
171 }
172
173 await renderAndFlush(<RemovableTest />)
174

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected