Control response moment #2518
Unanswered
maciekstosio
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I'm testing an app which sends few requests and shows loaders when waiting for the response. The problem is that react-testing-library checks if elements are being removed in 50ms intervals. I assume that, because I mock requests with nock they're resolved immediately, thus some state transitions are missed and tests are flaky. I know I can delay the request, but that will slow down all my tests. I wonder if it is possible to intercept the request and make it pending until explicitly told to replay? Or is there a chance that something like that is going to be added in the future?
Beta Was this translation helpful? Give feedback.
All reactions