()
| 142 | test('tooltip handles active anchor being removed', async () => { |
| 143 | // Create a component where we'll remove the active anchor |
| 144 | const RemovableTest = () => { |
| 145 | const [showAnchor, setShowAnchor] = useState(true) |
| 146 | |
| 147 | useEffect(() => { |
| 148 | // Remove the anchor after a delay |
| 149 | const timer = setTimeout(() => { |
| 150 | setShowAnchor(false) |
| 151 | }, 100) |
| 152 | return () => clearTimeout(timer) |
| 153 | }, []) |
| 154 | |
| 155 | return ( |
| 156 | <div> |
| 157 | {showAnchor && <span data-tooltip-id="removable-test">Hover Me</span>} |
| 158 | <TooltipController id="removable-test" content="Removable Test" /> |
| 159 | </div> |
| 160 | ) |
| 161 | } |
| 162 | |
| 163 | // Render the component |
| 164 | render(<RemovableTest />) |
nothing calls this directly
no outgoing calls
no test coverage detected