You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Confirmed: expect.objectContaining() does not work if Symbols are used as property keys. At the same time, toMatchObject() matcher does the right job. Something goes wrong with the logic of objectContaining.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.
Version
29.5.0
Steps to reproduce
git clone git@github.com:peterrattew/jest-object-containing-example.git
npm install
npm run test
Expected behavior
In
objectContaining.symbols.test.js
I would expect the first test to fail and the second test to pass, but it is currently the reverse.When converting the Symols to strings or using
toMatchObject
the correct tests pass.Actual behavior
The first test in
objectContaining.symbols.test.js
passes and the second fails.Additional context
This is my first time raising a bug here so please let me know if I have done something wrong.
Environment
System: OS: Linux 5.0 undefined CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz Binaries: Node: 16.20.0 - /usr/local/bin/node Yarn: 1.22.19 - /usr/local/bin/yarn npm: 9.4.2 - /usr/local/bin/npm pnpm: 8.6.3 - /usr/local/bin/pnpm npmPackages: jest: ^29.5.0 => 29.5.0
The text was updated successfully, but these errors were encountered: