Skip to content

Regression: jest-dom removed from dependencies #146

Closed
@nickserv

Description

@nickserv
  • react-testing-library version: 4.1.3

Relevant code or config:

import 'jest-dom/extend-expect'

Problem description:

4.1.3 updates dom-testing-library to 3, which removes its dependency on jest-dom and a re-export. This is a breaking change in react-testing-library, which still documents a jest-dom import, causing my tests to fail after updating the package.

Suggested solution:

Revert 4.1.3 or deprecate it and release a major release of this library to signify a breaking change and document that jest-dom should be installed manually.

Workaround:

Install jest-dom.

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