# All channels
Sachin D. Shinde@sachin-shinde
Mutation doesn't resolve in Jest test
Getting the following error: Async callback was not invoked within the 5000ms timeout specified by jest.setTimeout. The console.log('created log') never runs. I've been stuck on this for two days, so any help would be hugely appreciated! The test: …
fields contained in fragment are not being returned from mocks
Intended outcome: I'm trying to write some tests that involve some queries that contains fragments in them. The fields in the fragments get retrieved just fine in the local environment, but when I try to run it through jest, I get back all the fields except for the ones in the…
MockedProvider never returns any data
[email protected] with testing-library/[email protected] i am using useLazyQuery and in test mode it never resolves. loading is always true and data always undefined. My mock query and variables match exactly the query and variables used in the component i am testing, yet i still get no…
Why use MockedProvider when I can spyOn 'useQuery'?
After struggling for hours on implementing MockedProvider into my test setup (it is still not working and query results are undefined) I was asking myself why to use the MockedProvider in the first place and not just provide a mocked return value for the useQuery…
What is the proper way to wait for reactive variables in tests?
I asked a question on StackOverflow with all the details and examples: Can someone have a look and answer the thread? https://stackoverflow.com/questions/63880395/what-is-the-proper-way-to-wait-for-reactive-variables-in-tests