Skip to content

How to mock a client with React Suspense enabled? #3374

Answered by JoviDeCroock
sheldonbaker asked this question in Q&A
Discussion options

You must be logged in to vote

We currently don't have a great answer to this, the way I would do it is by probably having a real client in there with the executeExchange similar to how we do our E2E tests 😅 https://github.com/urql-graphql/urql/blob/main/packages/react-urql/e2e-tests/useQuery.spec.tsx#L73 the delayExchange here simulates going from loading to not-loading.

I will check whether there is more we can do to help you out here

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@sheldonbaker
Comment options

@JoviDeCroock
Comment options

Answer selected by sheldonbaker
@kitten
Comment options

@sheldonbaker
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants