Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/src/pages/guides/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ await waitFor(() => {
return result.current.isSuccess;
});

expect(result.current).toEqual({answer: 42});
expect(result.current.data).toEqual({answer: 42});
```

Here we are making use of `waitFor` and waiting until our the query status indicates that the request has succeeded. This way we know that our hook has finished and should have the correct data.
Expand Down