TanStackT
TanStack3y ago
2 replies
popular-magenta

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:

<body>
  <div>
    Loading...
  </div>
</body> 


Running the actual app, you can see that accounts are rendered in the Accounts component.

Why is test stuck on the
isLoading
condition?
CodeSandboxrostgoat
strange-sound-86mc3p by rostgoat using @tanstack/react-query, @testing-library/react, @testing-library/user-event, axios, jest, loader-utils, msw, react, react-dom
strange-sound-86mc3p - CodeSandbox
Was this page helpful?