Testing custom useMutation #1650
Unanswered
caiquecastro
asked this question in
Q&A
Replies: 2 comments 5 replies
-
I'm wondering about this too. I can't find a way to actually trigger the mutation. I can render the hook with |
Beta Was this translation helpful? Give feedback.
4 replies
-
Hey Guys for anyone using vitest here is an eg: // mock the file where custom mutate function is declared:
// in the test we can import the actual implementation and see, any type is used as there are too many this in mutation hook to be mocked
|
Beta Was this translation helpful? Give feedback.
1 reply
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Have anyone experience with tests for custom useMutation?
Beta Was this translation helpful? Give feedback.
All reactions