Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Expose matcher operations #2697

Closed
wants to merge 1 commit into from
Closed

Conversation

mattkubej
Copy link
Contributor

@mattkubej mattkubej commented Oct 27, 2023

Description

graphql-testing/matchers and react-testing/matchers are side-effect imports, which extend Jest's expect automatically for the consumer. This does provide the consumer control over how/when they would like to extend Jest's expect. This is specifically helpful with lazily loading these matchers.

This PR exposes the operations for each of the packages without extending Jest's expect to allow the consumer to do this themselves. /matchers now exports the matchers without extending Jest's expect, so the consumer can do it themselves. If a consumer wants to have all the matchers loaded via a side-effect import, then /matchers-all will provide that.

@mattkubej mattkubej force-pushed the expose-matcher-operations branch 4 times, most recently from bd78a0f to 90d686a Compare October 27, 2023 21:09
@mattkubej
Copy link
Contributor Author

No longer needed as an alternative has been found to lazy load side-effect imported matchers

@mattkubej mattkubej closed this Oct 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants