Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FollowersList test is not working. #12

Open
aliraza944 opened this issue Feb 8, 2022 · 0 comments
Open

FollowersList test is not working. #12

aliraza944 opened this issue Feb 8, 2022 · 0 comments

Comments

@aliraza944
Copy link

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'));

Here is the link to the stack overflow problem https://stackoverflow.com/questions/67300260/how-would-i-test-this-using-jest-react-testing-library

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant