Encountering Error While Testing React Query v5 with Nock and Jest #6422
Unanswered
mirabo-cuongnv
asked this question in
Q&A
Replies: 1 comment
-
hard to say without seeing a running reproduction. maybe your mutationFn uses |
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
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to test a custom hook that uses react-query v5 for data fetching in a React 18 project. The API call is mocked using nock.


I have have succeeded with get success, get error, and mutate success cases. However, I'm facing an issue when attempting to test the mutate error case.
Below are the cases I have tested successfully:

Tkank all alot
Beta Was this translation helpful? Give feedback.
All reactions