neverthrow
neverthrow copied to clipboard
Update to 8.1.0 breaks `toMatchObject` comparison
Using the following test
it('Can compare objects', () => {
expect(err({ important: 42, useless: 7 })).toMatchObject(err({ important: 42 }));
expect(err({ important: 42, useless: 7 })).not.toMatchObject(err({ important: 43 }));
});
was possible (and often times used for our code), but now breaks with 8.1.0 with
Error: expect(received).toMatchObject(expected)
- Expected - 1
+ Received + 1
- Err {
+ Object {
"error": Object {
"important": 42,
},
}
Any ideas why?