-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Testing Mutation - Waiting for Mutation to Complete #6452
Comments
The point of await new Promise(resolve => setTimeout(resolve, 0)); Or if you're using await act(async () => {
// perform some action that would cause the mutation to fire
}); Hope this helps! |
I was able to get past this. My issue now is on queries. I see the loading go from true to false however I get null data and no errors. Unlike a mutation I do not see what could help in terms of validation it's called - the code is using a useQuery |
Is you query using the |
I'm not setting that specifically anywhere ? |
The documentation shows this line of code
This throws an error:
TypeError: callback is not a function
What is the proper way to wait for a mutation to complete in a react library test/jest scenario ?
The text was updated successfully, but these errors were encountered: