Skip to content

jest-dom added additional condition to toBeVisible preventing use in component test. #102

Open
@milkshakeuk

Description

@milkshakeuk

I'm submitting a bug report

  • Library Version:
    1.1.0

Please tell us about your environment:

  • Operating System:
    Windows 11

  • Node Version:
    16.5.0

  • NPM Version:
    7.20.0

  • JSPM OR Webpack AND Version
    webpack: 5.72.1

  • Browser:
    jest component test

  • Language:
    typescript

Current behavior:
We recently updated our dependencies and it looks like jest-dom changed the behaviour of toBeVisible and added a new condition in v5.11.10 so all versions since then (2021-03-25) have the same issue:

it is present in the document

This is causing our component tests to fail with an exception, when we locate an element from the component and try to asset that it is visible.

image

I am assuming this can be fixed somehow by a change in the aurelia-testing package.

Expected/desired behavior:
it should not fail or throw an exception

  • What is the expected behavior?

  • What is the motivation / use case for changing the behavior?
    the jest-dom package has added an extra condition to its toBeVisible method.

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