How to await useQuery result in a custom hook test
Hello,
So, I already know how to test a useQuery hook, and that it needs to
await waitFor
the success or error.
But how do you await a useQuery completion from "within" a custom hook ?
Code of my custom hook:
Whenever I test it, it does not await the userPermission request, and doing an await waitFor(() => expect(result.current).toBe(true))
does not work 😦0 Replies