Testing useQuery by mocking it's callback
Hello
I want to test my component by mocking the callback used by useQuery
To do so I use Jest's
Well, it should but it don't
I tried several things (can't enumerate them since I've tried a lot of "solutions"
)
Here is code snippet for your help (in comment)
I want to test my component by mocking the callback used by useQuery
To do so I use Jest's
spyOn function, which should spy on the named exported function and should use the mocked implementation if given.Well, it should but it don't
I tried several things (can't enumerate them since I've tried a lot of "solutions"
Here is code snippet for your help (in comment)