-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
[Feature]: add a waitBeforeRetry option to jest.retryTimes #14737
Labels
Comments
WillianAgostini
changed the title
[Feature]:
[Feature]: add a waitBeforeRetry option to jest.retryTimes
Dec 4, 2023
WillianAgostini
added a commit
to WillianAgostini/jest
that referenced
this issue
Dec 4, 2023
WillianAgostini
added a commit
to WillianAgostini/jest
that referenced
this issue
Dec 4, 2023
WillianAgostini
added a commit
to WillianAgostini/jest
that referenced
this issue
Dec 4, 2023
WillianAgostini
added a commit
to WillianAgostini/jest
that referenced
this issue
Dec 23, 2023
WillianAgostini
added a commit
to WillianAgostini/jest
that referenced
this issue
Dec 24, 2023
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
🚀 Feature Proposal
It would be nice to be able to tell Jest to wait some amount of time before retrying tests. I think for most use cases, just a static number of milliseconds would be sufficient.
Based on #13659
Motivation
I have a test for an API that relies on a third-party API to execute successfully. Using a mock is not feasible in this scenario, as the test requires fetching real-time data directly from the API. However, there are instances where timeout errors occur. To address this issue, I am considering the use of
jest.retryTimes
. The rationale behind this approach is to introduce a timeout between tests that may require a retry, thus mitigating timeout errors.Example
Pitch
Utilize a time interval between tests, as there are situations where the API is temporarily unavailable. The use of new attempts after the timeout period may lead to success in the CI process.
The text was updated successfully, but these errors were encountered: