When comparing two values using toEqual, quite often they can look equal and produce the No visible difference message even though they are completely different objects.
Example:
expect({a: 1, toJSON: () => 'foo'}).toEqual({a: 2, toJSON: () => 'foo'});
this will produce "No visible difference". When this happens, we should run pretty-format again with toJSON calls disabled and then print an initial message that says we are printing the internal object structure (or something) and then diff that.
See #1727
When comparing two values using
toEqual, quite often they can look equal and produce theNo visible differencemessage even though they are completely different objects.Example:
this will produce "No visible difference". When this happens, we should run pretty-format again with
toJSONcalls disabled and then print an initial message that says we are printing the internal object structure (or something) and then diff that.See #1727