(command: string)
| 46 | } |
| 47 | |
| 48 | function getCurlMaxTime(command: string): number { |
| 49 | const match = /--max-time\s+([0-9.]+)/.exec(command); |
| 50 | if (!match) { |
| 51 | throw new Error(`Missing --max-time in curl command: ${command}`); |
| 52 | } |
| 53 | |
| 54 | return Number.parseFloat(match[1]); |
| 55 | } |
| 56 | |
| 57 | afterEach(() => { |
| 58 | // Restore all spies (including the Date.now spy in the shared-timeout-budget |