Skip to content

Changing Mock Server Response inside tests #5752

Closed Answered by enszrlu
enszrlu asked this question in Q&A
Discussion options

You must be logged in to vote

Edit: In case anyone would have this issue in the future, how you need to use waitFor is changed with React 18+, see below. Also clear queryClient after each test!

await waitFor(() => expect(result.current.isSuccess).toBe(true));

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by enszrlu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant