()
| 200 | test('tooltip handles attribute changes', async () => { |
| 201 | // Create a component where we'll change attributes |
| 202 | const AttributeChangeTest = () => { |
| 203 | const [tooltipId, setTooltipId] = useState('attribute-test') |
| 204 | |
| 205 | useEffect(() => { |
| 206 | // Change the tooltip ID after a delay |
| 207 | const timer = setTimeout(() => { |
| 208 | setTooltipId('changed-id') |
| 209 | }, 100) |
| 210 | return () => clearTimeout(timer) |
| 211 | }, []) |
| 212 | |
| 213 | return ( |
| 214 | <div> |
| 215 | <span data-tooltip-id={tooltipId}>Hover Me</span> |
| 216 | <TooltipController id="attribute-test" content="Original ID" /> |
| 217 | <TooltipController id="changed-id" content="Changed ID" /> |
| 218 | </div> |
| 219 | ) |
| 220 | } |
| 221 | |
| 222 | // Render the component |
| 223 | render(<AttributeChangeTest />) |
nothing calls this directly
no outgoing calls
no test coverage detected