I'm writing a custom Jest matcher to compare objects in some arbitrary way:
expect.extend({
toTorgle(received, expected) {
...
return {
pass: false,
message: () => "expect(received).toTorgle(expected):" + ???
}
}
})
How can I print a nice object diff between the two objects, like the one that I get with (built-in matcher) expect(received).toEqual(expected)?