You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the 06-Mocking-Async-Request branch the test to the FollowersList component this test case should fetch and render input element is not working. The line const followerDivElement = await screen.findByTestId('follower-item-0') gives an error that Unable to find an element by: [data-testid="follower-item-0"].
This error can be removed by using the waitfor syntax.
Just add the line await waitFor(() => screen.findByTestId('follower-item-0'));
In the 06-Mocking-Async-Request branch the test to the FollowersList component this test case should fetch and render input element is not working.
The line
const followerDivElement = await screen.findByTestId('follower-item-0')
gives an error thatUnable to find an element by: [data-testid="follower-item-0"]
.This error can be removed by using the
waitfor
syntax.Just add the line
await waitFor(() => screen.findByTestId('follower-item-0'));
Here is the link to the stack overflow problem https://stackoverflow.com/questions/67300260/how-would-i-test-this-using-jest-react-testing-library
The text was updated successfully, but these errors were encountered: