# All channels
Sachin D. Shinde@sachin-shinde
How do I get rid of these act console errors"
I'm converting my code to use apollo hooks and I'm running into problems when updating the unit test. I can't get rid of this no matter what I do. I've wrapped it in the act module and updated my version of react to latest to make sure I have the async version.
How do I test that a mutation is run when using MockedProvider?
Hi! I'm working with React and Apollo. I have a component with a button that fires a mutation when clicked. I would like to write a test that confirms that when the button is clicked, the mutation is fired. Reading the docs on testing mutations there doesn't seem to be a way to…
Is testing with Mock reliable?
I have a doubt in MockedProvider section https://www.apollographql.com/docs/react/development-testing/testing/#mockedprovider If we mock all the graphql request, it will pass the test suite. But, it might loss consistency with actual implementation. Hence, it results bug in…
Testing react components - additional information.
https://www.apollographql.com/docs/react/development-testing/testing/#testing-loading-states The documented example doesn't mention why act errors appear, how to avoid them and also that providing an empty array of mocks results in an error object being defined. The act errors…
How to unit test the ApolloProvider from @apollo/react-hooks queries using…
When using MockedProvider in tests, I get the below error is there a different MockedProvider test-utils to test the version of the hooks? Currently, I'm testing it using with the below workaround …
Testing with @client directives in queries
If we don't require a very specific set of mocked data, I like to use a 'mock client' that has been initialized using a mock schema created using the addMockFunctionsToSchema and makeExecutableSchema. This is VERY handy for running through the app with randomly generated data…