Closed
Description
Bug description
Test suites with only one test fail.
Version of Package
v5.21.1 but behaviour first seen in v5.20.0
To Reproduce
Delete all tests in src/test/tooltip-props.spec.js
except for "basic tooltip". Update snapshots to reduce noise.
OR
Replace test
with test.only
instead of deleting all the other tests.
Test run results in failure:
$ jest src/test/tooltip-props.spec.js
FAIL src/test/tooltip-props.spec.js
tooltip props
✕ basic tooltip (1295 ms)
● tooltip props › basic tooltip
Unable to find role="tooltip"
Ignored nodes: comments, script, style
<body>
<div>
<span
id="basic-example"
>
Lorem Ipsum
</span>
</div>
</body>
24 | let tooltip = null
25 |
> 26 | await waitFor(() => {
| ^
27 | tooltip = screen.getByRole('tooltip')
28 | expect(tooltip).toHaveAttribute('style')
29 | })
at waitForWrapper (node_modules/@testing-library/dom/dist/wait-for.js:166:27)
at Object.<anonymous> (src/test/tooltip-props.spec.js:26:18)
Expected behavior
Test should pass
Desktop (please complete the following information if possible or delete this section):
- OS: ubuntu