feat(object-assertion): Matchers use variadic arguments#89
Conversation
b88e7db to
c5b9029
Compare
byrpatrick
left a comment
There was a problem hiding this comment.
LGTM! I like how it displays the diff when the assertion fails.
Also, thanks @JoseLion for pointing that out 😅 I forgot to include the expected property during the first iteration. It is missing the expected property on the following methods too:
toBeEmptytoContainKeytoContainValuetoContainEntry
Do you mind if I commit a fix for this on this branch?
|
As we discussed internally, it'd be ok to add the expected value to |
BREAKING CHANGE: Some ObjectAssertion matchers should use variadic arguments instead of arrays array
c5b9029 to
a513ae6
Compare
|
@all-contributors please add @byrpatrick for review |
|
I've put up a pull request to add @byrpatrick! 🎉 |
|
🎉 This PR is included in version 1.3.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This PR updates most of the
ObjectAssertionmatches to use variadic parameters. It also updates theAssertionErroroptions so we can show diffs when the assertion fails, providing more complete information to the user.