Replies: 1 comment
-
don't mock the queryClient. check if the query still exists in the client. if remove was called, the query should no longer be there. |
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.
-
hey friends,
I am trying to use jest test the useMutation call back hook and having trouble to find a way to test the
queryClient.removeQueries
, My main goal is to see if we ever called queryClient.removeQueries() function or not.I have been searching on internet, it seems like all the tutorial/blog did not test queryClient.removeQueries(), Thanks for any kind of ideas or help!.
Here is the code I want to test:
Here is test I got so far:
Beta Was this translation helpful? Give feedback.
All reactions