Skip to content

[BUG] Single test fails #1083

Closed
Closed
@kevcenteno

Description

@kevcenteno

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions