Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ToBeEmpty assertion in jest-native is also used in jest-extended #102

Closed
AugustinLF opened this issue Aug 25, 2022 · 2 comments · Fixed by #111
Closed

ToBeEmpty assertion in jest-native is also used in jest-extended #102

AugustinLF opened this issue Aug 25, 2022 · 2 comments · Fixed by #111

Comments

@AugustinLF
Copy link

Describe the feature you'd like:

Jest-Extended has an assertion named the same as jest-native's one:

-> https://github.com/jest-community/jest-extended#tobeempty
-> https://github.com/testing-library/jest-native#tobeempty

When both libs are used in the same project, the version of jest-extended overwrites the one from jest-native.

@testing-library/jest-dom has had the same problem testing-library/jest-dom#216 and they renamed their matcher to toBeEmptyDOMElement .

Suggested implementation:

I wished we could have the same matcher on both platforms, but toBeEmptyDOMElement doesn't make sense on native, so I'd suggest something like toBeEmptyElement, or toBeEmptyNode.

Teachability, Documentation, Adoption, Migration Strategy:

We should do like @testing-library/jest-dom, i.e. add the new matcher and tag the current one as deprecated.

@mdjastrzebski
Copy link
Collaborator

I am for toBeEmptyElement. @AugustinLF could you submit PR for that?

@joaoGabriel55
Copy link
Contributor

joaoGabriel55 commented Sep 22, 2022

Hey @mdjastrzebski. I can send a PR for that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants