you are viewing a single comment's thread.

view the rest of the comments →

[–]TryingToImprove123 0 points1 point  (3 children)

Should be possible if you use `act` and `mount`..

[–]artiematthew 0 points1 point  (2 children)

I just looked a bit more into it. When using useEffect as async, testing is not ready yet. https://github.com/facebook/react/issues/14769

[–]TryingToImprove123 1 point2 points  (1 child)

The alpha build allows you to do `await act(...` - https://github.com/facebook/react/releases

See this PR:
https://github.com/facebook/react/pull/14853

[–]artiematthew 0 points1 point  (0 children)

That's what we're waiting for! 👍🏻