-
Notifications
You must be signed in to change notification settings - Fork 82
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
Chai assert matchers #144
Chai assert matchers #144
Conversation
The Chai docs show the method name as 'notPropertyVal': https://www.chaijs.com/api/assert/#method_notpropertyval
Codecov Report
@@ Coverage Diff @@
## master #144 +/- ##
==========================================
+ Coverage 94.89% 94.96% +0.07%
==========================================
Files 24 24
Lines 1233 1251 +18
==========================================
+ Hits 1170 1188 +18
Misses 63 63
Continue to review full report at Codecov.
|
Thanks. About the last commit: According to chai changelog So we shouldn’t remove that property, but also support the new name. |
@skovhus Ah, nice find! Sorry about that. I reverted the last commit and added conversions/tests for |
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! 🙌
This pull request adds matchers (and tests) for the following Chai
assert
matchers:deepProperty
notDeepProperty
deepPropertyVal
notDeepPropertyVal
deepPropertyNotVal
notPropertyVal
I made a tiny repl to ensure the Jest conversions were valid: https://repl.it/repls/TurboRunnyApplicationsuite.
I also noticed that(Reverted and added as a new method)propertyNotVal
is actually shown asnotPropertyVal
in the Chai documentation: https://www.chaijs.com/api/assert/#method_notpropertyval. I changed the method name to match the Chai docs but I am happy to revert that commit ifpropertyNotVal
was actually the correct method name.