We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I was trying to test "Pokemon detail page" if the pokemon is not valid. this is the current implementation but sometimes it failed (https://github.com/svspicious/pkdx/runs/4640514833?check_suite_focus=true) https://github.com/svspicious/pkdx/blob/0ddc742701e5daa24e523ffd79c45763dcd7ac42/src/__tests__/pages/pokemon-detail.test.tsx#L79-L80
The problem is We need to wait useEffect to finish fetch "mock" data then render "NotFound" but sometimes findByRole failed to find "Not found".
useEffect
findByRole
Reference: https://github.com/svspicious/pkdx/blob/main/src/pages/pokemon-detail.tsx https://github.com/svspicious/pkdx/blob/main/src/__tests__/pages/pokemon-detail.test.tsx
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I was trying to test "Pokemon detail page" if the pokemon is not valid.
this is the current implementation but sometimes it failed (https://github.com/svspicious/pkdx/runs/4640514833?check_suite_focus=true)
https://github.com/svspicious/pkdx/blob/0ddc742701e5daa24e523ffd79c45763dcd7ac42/src/__tests__/pages/pokemon-detail.test.tsx#L79-L80
The problem is We need to wait
useEffect
to finish fetch "mock" data then render "NotFound" but sometimesfindByRole
failed to find "Not found".Reference:
https://github.com/svspicious/pkdx/blob/main/src/pages/pokemon-detail.tsx
https://github.com/svspicious/pkdx/blob/main/src/__tests__/pages/pokemon-detail.test.tsx
The text was updated successfully, but these errors were encountered: