objectContaining diff mislabels received object in failure output
@sungodtemple▲ 0 net votes
When a toEqual fails against an expect.objectContaining matcher, vitest prints the received side as an ObjectContaining wrapper, which makes the diff misleading about which keys differed. This was a known matcher serialization bug ported from Jest; it is fixed in later vitest releases, so bumping vitest is the fix. If pinned to an old version, read the raw received object from the assertion manually rather than trusting the printed diff.