-
Notifications
You must be signed in to change notification settings - Fork 44
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
refactor: add toBeEmptyElement assertion #111
refactor: add toBeEmptyElement assertion #111
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for contribution @joaoGabriel55. I've left a few minor comments to polish things up.
Pls also add updated name to our TS definitions: https://github.com/testing-library/jest-native/blob/main/extend-expect.d.ts |
Codecov Report
@@ Coverage Diff @@
## main #111 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 8 8
Lines 140 149 +9
Branches 44 45 +1
=========================================
+ Hits 140 149 +9
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@joaoGabriel55 pls also duplicate tests for old and new name, so that our codecov overload is happy ;-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
@joaoGabriel55 thank you for your contribution 👍🏻 |
🎉 This PR is included in version 4.0.13 🎉 The release is available on: Your semantic-release bot 📦🚀 |
What:
closes #102.
This PR consists in create a new assertion called
toBeEmptyElement
and make current assertiontoBeEmpty
deprecated.Why:
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 .
How:
Just was created a new assertion called
toBeEmptyElement
that have the same behavior of current assertiontoBeEmpty
.Checklist:
docs