( enabled: boolean, afterRequests = 0, forAuthType?: string, )
| 76 | * Enable/disable 429 simulation programmatically (for tests) |
| 77 | */ |
| 78 | export function setSimulate429( |
| 79 | enabled: boolean, |
| 80 | afterRequests = 0, |
| 81 | forAuthType?: string, |
| 82 | ): void { |
| 83 | simulate429Enabled = enabled; |
| 84 | simulate429AfterRequests = afterRequests; |
| 85 | simulate429ForAuthType = forAuthType; |
| 86 | fallbackOccurred = false; // Reset fallback state when simulation is re-enabled |
| 87 | resetRequestCounter(); |
| 88 | } |
no test coverage detected