-
Notifications
You must be signed in to change notification settings - Fork 238
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
Suggest toMatchObject over toEqual(expect.objectContaining) #230
Comments
I wonder if we maybe want to go the other way? Would be nice to remove /cc @thymikee |
It's more writing though, I'm not sure if people would like it. We could start with something like |
Those matchers from time to time lead me into confusion with respect to each one to use, the differences between both, etc. And it's not just me (20k views): https://stackoverflow.com/questions/45692456/whats-the-difference-between-tomatchobject-and-objectcontaining |
@rdsedmundo Yes I absolutely agree. That's why I wrote a rule for myself, for the moment, which prefers |
🎉 This issue has been resolved in version 23.11.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
If
expect().toEqual(expect.objectContaining)
is the same asexpect().toMatchObject()
then perhaps have a rule to suggest the latter instead?The text was updated successfully, but these errors were encountered: