Replies: 1 comment
-
workaround i found is: expect(myFetch).toHaveBeenCalledWith("http://api.test:8000/profile", expect.any); Duh... |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
i want to check if fetch was called with a specific url (and later with another url...), but i already fail on asserting the first call.
i set up a fetch mock and test with this:
and i get this:
I'm not interested in the header, as the fetch is mocked anyways, bit i'cant figure out how to just check the url...
The output hints that the nesting of response and asymmetric test is not as it should be, right?
Can't
arrayContaining
not be used intoHaveBeenCalledWith
?jest claims it should work like that and and old and closed issue relating is #43 says it should too.
What i'm doing wrong here?
Beta Was this translation helpful? Give feedback.
All reactions