-
-
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
A single failure in toHaveBeenCalledWith() when using expect.stringContaining() will show other expected results as failed #9937
Comments
Note: originally repl.it failed with:
So there wasn't a repl link. It's been added now, so the |
This sounds like what #9257 was supposed to fix... Maybe it's just missing for this matcher? |
any news on this ? i'm on 27.0.6 |
Feel free to send a PR 🙂 |
@SimenB Since its been 2 years, i was just asking some news if this is been fixed ? |
You could try out using the latest version of Jest yourself. Seeing as you say it still reproduces on 27.0.6 it seems unlikely to have been fixed |
Checked it with the latest version. Seems to still be there. Did not fix itself (; |
i used a workaround by making a custom matcher , extending it in jest. Sorry i don't have much time to spend to help you guyz. |
I want to test socket.io its io.to(room).emit(event, data) if had been call and check its args , so I do this way: my mock:
my test:
error:
That's weird. |
This issue is stale because it has been open for 1 year with no activity. Remove stale label or comment or this will be closed in 30 days. |
This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one. |
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. |
🐛 Bug Report
A single failure in
toHaveBeenCalledWith()
when usingexpect.stringContaining()
will show other successful results as failed. See the reproduction case below!To Reproduce
Expected behavior
Actual behaviour
Link to repl or repo (highly encouraged)
https://repl.it/repls/ImpishTerrificOperation
envinfo
The text was updated successfully, but these errors were encountered: