Make toBe
matcher error message more helpful for objects and arrays
#4228
Labels
toBe
matcher error message more helpful for objects and arrays
#4228
Do you want to request a feature or report a bug?
Enhancement
What is the current behavior?
Using
expect(object).toBe(otherObject)
fails with default message.What is the expected behavior?
Since this is a common mistake, we could detect if the received entity is an object or an array and display helpful message like:
We can figure out better wording, this is just an idea :)
The text was updated successfully, but these errors were encountered: