I have a code like below
expect(insertedData).toEqual({
id: expect.any(String),
clientId: 'client1',
...
I expect id should match any string, but what I get as result is

Not sure what I missed.
Also I used like below still same error
expect(insertedData).toEqual(expect.objectContaining({
It happens to me. Turns out the problem is not with the fields with expect.any() but the other field. Seems it just bad diff there.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With