Wrong diff for objectContaining
lcswillems opened this issue · comments
Lucas Willems commented
Describe the bug
Same bug just resolved in Jest:
Issue: jestjs/jest#14897
Expected behavior
Message:
expect(received).toEqual(expected) // deep equality
- Expected - 2
+ Received + 2
- ObjectContaining {
+ Object {
"a": 1,
"b": 2,
- "c": 2,
+ "c": 3,
}
Actual behavior
Message:
expect(received).toEqual(expected) // deep equality
- Expected - 2
+ Received + 3
- ObjectContaining {
+ Object {
+ "a": 1,
"b": 2,
- "c": 2,
+ "c": 3,
}
Reproduction
System Info
vitest 1.3.0
Used Package Manager
npm
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.