Here is my code for a tooltip that toggles the CSS property display: block on MouseOver and on Mouse Out display: none.
display: block
display: none
it(\'should sho
Instead of doing:
expect(queryByText('test')).toBeInTheDocument()
you can find and test that it is in the document with just one line by using
let element = getByText('test');
The test will fail if the element isn't found with the getBy call.