-
Notifications
You must be signed in to change notification settings - Fork 761
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
Enhancement: add support for .retry(n) #167
Comments
Yes, definitely would like to see this. Related: segmentio/superagent-retry#8 |
Actually getting it to work is quite easy by using https://github.com/segmentio/superagent-retry. All that is needed to add
And change
to:
But I don't know if |
Actually, it would be nice Supertest allowed Superagent plugins to be set up by the user. I'm not sure if that can currently be done without changes to Supertest code. |
I'm actually interested in @kristerkari's last comment - I want to use supertest with superagent-prefix so that my tests don't keep repeating a common portion of the URL path. |
Hello, Any update on this ticket? Thanks, |
Quick note - I was able to get plugins to work by requiring superagent beforehand and applying the plugins before requiring supertest const superagent = require('superagent');
require('superagent-retry')(superagent);
const supertest = require('supertest'); |
@zabawaba99 alas this workaround does not work for the module |
Was this issue closed because there are no plans to add retry support for supertest? |
In a perfect world, there would be no ECONREST or ENOTFOUND, or 504, but in the real-world, especially when performing functional/integration tests while another team might be running load tests on a shared test environment, it would be really helpful to not bail at the first sign of trouble.
This enhancement request is for the addition of a '.retry(n)' request option.
i.e.
The text was updated successfully, but these errors were encountered: