Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong diff for objectContaining #5714

Open
6 tasks done
lcswillems opened this issue May 13, 2024 · 0 comments
Open
6 tasks done

Wrong diff for objectContaining #5714

lcswillems opened this issue May 13, 2024 · 0 comments
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)

Comments

@lcswillems
Copy link

Describe the bug

Same bug just resolved in Jest:

Issue: jestjs/jest#14897

PR: jestjs/jest#15038

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

https://stackblitz.com/edit/vitest-dev-vitest-191yhj?file=test%2Fbasic.test.ts&initialPath=__vitest__/

System Info

vitest 1.3.0

Used Package Manager

npm

Validations

@hi-ogawa hi-ogawa added p3-minor-bug An edge case that only affects very specific usage (priority) and removed pending triage labels May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

No branches or pull requests

2 participants