-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Visual diff for functions is broken in conjunction with typed arrays #8947
Comments
Does it happen on the latest Jest? cc @pedrottimark |
@leoselig Thank you for the link to the replication! Sorry for the delay to reply. There are two problems:
If deep-equality assertion fails only because of a function value, then the report displays A work-around for problem 2 is |
Thanks for the in-depth explanation @pedrottimark! And no worries about the delay. :) |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
🐛 Bug Report
The visual diff between two objects shows a wrong diff when the objects contain a differing function on one field and identical typed arrays on another field. In that case, the visual diff indicates a mismatch of the typed array field but not of the two functions.
To Reproduce
Steps to reproduce the behavior:
Perform an assertion via
toMatchObject()
ortoEqual()
as done here: https://repl.it/repls/KindSoftOutcomeExpected behavior
Both
expect()
assertions shoudl fail (as they do) but show"Received: serializes to the same string
for the fieldfoo
.Link to repl or repo (highly encouraged)
https://repl.it/repls/KindSoftOutcome
envinfo
The text was updated successfully, but these errors were encountered: