* Creates a mock GitHub API rate-limit error object (HTTP 403 with x-ratelimit-remaining: 0) * that matches what octokit returns when the installation token quota is exhausted. * @param {string} [message] * @returns {Error}
(message = "API rate limit exceeded")
| 3571 | * @returns {Error} |
| 3572 | */ |
| 3573 | function createRateLimitError(message = "API rate limit exceeded") { |
| 3574 | return Object.assign(new Error(message), { |
| 3575 | status: 403, |
| 3576 | response: { headers: { "x-ratelimit-remaining": "0" }, status: 403 }, |
| 3577 | }); |
| 3578 | } |
| 3579 | |
| 3580 | beforeEach(() => { |
| 3581 | originalEnv = { ...process.env }; |
no outgoing calls
no test coverage detected