(body: Record<string, unknown>)
| 66 | }) |
| 67 | |
| 68 | function createRequest(body: Record<string, unknown>) { |
| 69 | return new NextRequest('http://localhost:3000/api/v1/ads', { |
| 70 | method: 'POST', |
| 71 | headers: { |
| 72 | Authorization: 'Bearer test-key', |
| 73 | 'Content-Type': 'application/json', |
| 74 | 'User-Agent': 'CodebuffCLI/1.0', |
| 75 | 'X-Forwarded-For': '203.0.113.10', |
| 76 | }, |
| 77 | body: JSON.stringify(body), |
| 78 | }) |
| 79 | } |
| 80 | |
| 81 | test('falls back from Gravity to ZeroClick to Carbon', async () => { |
| 82 | const upstreamUrls: string[] = [] |