React test stuck on `isLoading` condition
Here is a reproducible sandbox: https://codesandbox.io/s/strange-sound-86mc3p?file=/src/Accounts.tsx
Run the test and check the console, this is the result:
Running the actual app, you can see that accounts are rendered in the
Accounts component.
Why is test stuck on the isLoading condition?rostgoat
CodeSandbox
strange-sound-86mc3p - CodeSandbox
strange-sound-86mc3p by rostgoat using @tanstack/react-query, @testing-library/react, @testing-library/user-event, axios, jest, loader-utils, msw, react, react-dom
2 Replies
adverse-sapphire•3y ago
probably because of:
that is also in the logs ?
like-goldOP•3y ago
yea you're right. moving that into the test fixed it