Skip to content

toBeVisible() returning true but it should return false #116

Closed
@jordyvandomselaar

Description

@jordyvandomselaar
  • jest-dom version: 3.5.0
  • node version:v11.9.0
  • npm version:6.7.0

We have an accordion that renders like so:

dwf

As you can see it defaults to being closed.

The elements inside should thus be hidden, but

expect(getByText('MC3')).not.toBeVisible();

Errors and says an element inside is visible.

The accordion library we're using is https://github.com/springload/react-accessible-accordion version 2.4.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions