Skip to content

Make @testing-library/dom a peer dependency #70

@gndelia

Description

@gndelia

Hi. First of all, thanks for this library, it works great for testing with react-select, which help us avoiding those ugly querySelector calls 😅

I'm using @testing-library/react which ships with its own version of @testing-library/dom, which may be different from the one used by this package. The issue we faced is that, suddenly, after installing this library, many tests started to fail, even though none of these were using this library. We think this discrepancy is due to the fact that this library adds another version of @testing-library/dom

If I understand correctly, as this works as a "plugin" of @testing-library/react it shouldn't be necessary to ship @testing-library/dom as a dependency, but as a peer dependency, as the consumers of this library will provide the proper version. Peer dependencies also allow to specify the minimum version required to work (in this case, >= 7).

Does that makes sense?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions