Skip to content
Discussion options

You must be logged in to vote

I would like to test that the list query requested a refetch from the server

I would just mock the actual fetchFn and then see if it contains the data i want, or if the mock has been called the amount of times i want it to be called. E.g. with something like https://jestjs.io/docs/en/mock-function-api#mockfnmockresolvedvalueoncevalue

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@gidztech
Comment options

@TkDodo
Comment options

@gidztech
Comment options

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