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

Cannot pass mock as parameter for toBeCalledWith #28

Closed
bizu82 opened this issue Apr 11, 2020 · 5 comments
Closed

Cannot pass mock as parameter for toBeCalledWith #28

bizu82 opened this issue Apr 11, 2020 · 5 comments

Comments

@bizu82
Copy link

bizu82 commented Apr 11, 2020

When I call toBeCalledWith passing another mock as parameter an error occurs.

Sample code:

expect(myMock.sampleMethod).toBeCalledWith(otherMock);

Error:

TypeError: Result of the Symbol.iterator method is not an object

@DavidMhn
Copy link

I have the same issue, is there any workaround?

@asnaseer-resilient
Copy link

I also experienced this issue and used the following undesirable workaround (based on the code above):

expect(myMock.sampleMethod.mock.calls[0][0]).toBe(otherMock);

@marchaos
Copy link
Owner

Should be fixed. Let me know if it is not otherwise

@asnaseer-resilient
Copy link

I assume this will be published as v1.0.9 - is there any eta on this?

@marchaos
Copy link
Owner

marchaos commented Jun 12, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants