(url, attempts)
| 15 | } |
| 16 | |
| 17 | async run(url, attempts) { |
| 18 | let result = await this.getResultWithRetry(url, attempts); |
| 19 | let failed = !result || !result.total || result.failed; |
| 20 | if (failed) { |
| 21 | throw result; |
| 22 | } |
| 23 | return result; |
| 24 | } |
| 25 | |
| 26 | async getResultWithRetry(url, attempts) { |
| 27 | while (attempts > 0) { |
no test coverage detected