Thanks to @bricka we got support for deepEqual
matcher.
If provided arguments to deepEqual
matcher are compatible no action is required.
But this update can cause compilation errors on existing code if provided values to deepEqual
type is not compatible. For example if expected param has more fields than provided one.
For easy migration you can use Partial
class.
Before:
const expectedParams = {
sampleField: 'sampleValue',
};
verify(mock.test(deepEqual(expectedParams))).once();
From 2.5.0:
const expectedParams: Partial<MyArgumentType> = {
sampleField: 'sampleValue',
};
verify(mock.test(deepEqual(expectedParams))).once();