-
-
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
expect.anything() error #4916
Comments
Hi, thanks for reporting! When you call mock(1)
expect(mock).toBeCalledWith(expect.anything()); But calling To make it work you could do one of the following: 1. Add more arguments to
|
Thanks @rogeliog <3 |
Hello! I just did a PR fixing this small issue 😃 |
Thanks!
--------------------------------------------
On Sun, 12/3/17, Alejandro López <[email protected]> wrote:
Subject: Re: [facebook/jest] expect.anything() error (#4916)
To: "facebook/jest" <[email protected]>
Cc: "Ronel Rustia" <[email protected]>, "Mention" <[email protected]>
Date: Sunday, December 3, 2017, 1:25 PM
Hello! I just did a PR fixing
this small issue 😃
—
You are receiving this because you were mentioned.
Reply to this email directly, view
it on GitHub, or mute
the thread.
|
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. |
In the expect.anything sample code, it's throwing an error in line 3("[1].map(mock)").
// Test code as below:
test('map calls its argument with a non-null argument', () => {
const mock = jest.fn();
[1].map(mock);
expect(mock).toBeCalledWith(expect.anything());
});
// Output from test below:
expect(jest.fn()).toBeCalledWith(expected)
The text was updated successfully, but these errors were encountered: