-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
[Bug]: Asymmetric matcher Object does not implement toAsymmetricMatcher() #13134
Comments
I guess this was introduced by #12626 |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days. |
@bjoluc The error is very misleading - the issue is that you cannot pass an array to |
Thanks for the clarification @SimenB! I was confused since this used to work in Jest v27. Is there any better workaround than nesting the array in an object? 😄 |
Not really - it's made for objects, not really an array of them... Could you open up a feature request for supporting arrays? |
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. |
Version
28.1.3
Steps to reproduce
npm install
npm test
Expected behavior
I expect
My test case
to pass and to write a snapshot.Actual behavior
My test case
fails withAsymmetric matcher Object does not implement toAsymmetricMatcher()
and does not write a snapshot.Additional context
No response
Environment
System: OS: Linux 5.4 Ubuntu 20.04.2 LTS (Focal Fossa) CPU: (8) x64 Binaries: Node: 16.16.0 - /usr/bin/node Yarn: 1.22.18 - /usr/bin/yarn npm: 8.15.0 - /usr/bin/npm npmPackages: jest: ^28.1.3 => 28.1.3
The text was updated successfully, but these errors were encountered: