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

Function expectTooltipToShow

src/test/tooltip-removal.spec.js:36–42  ·  view source on GitHub ↗
(tooltip)

Source from the content-addressed store, hash-verified

34}
35
36const expectTooltipToShow = async (tooltip) => {
37 await waitFor(() => {
38 expect(getTooltip()).toHaveClass('react-tooltip__show')
39 })
40 // the same element all along, not one that was removed and rendered again
41 expect(getTooltip()).toBe(tooltip)
42}
43
44const TestTooltip = ({ tooltipRef, ...tooltipProps }) => (
45 <>

Callers 1

Calls 1

getTooltipFunction · 0.70

Tested by

no test coverage detected