(method: string, target: string)
| 202 | // The front Worker answers the same requests the same way: everything the |
| 203 | // contract forwards reaches v2 once, and nothing else reaches it. |
| 204 | const runFrontCase = async (method: string, target: string) => { |
| 205 | const calls: Request[] = []; |
| 206 | const v2: V2Service = { |
| 207 | fetch: (request) => { |
| 208 | calls.push(request); |
| 209 | return Promise.resolve(new Response("v2")); |
| 210 | }, |
| 211 | }; |
| 212 | const request = new Request(`${contract.origin}${target}`, { method }); |
| 213 | const response = await frontResponse(request, { ...frontShipped, V2: v2 }); |
| 214 | return { request, calls, response }; |
| 215 | }; |
| 216 | |
| 217 | for (const { method, target } of forwarded) { |
| 218 | it(`front Worker forwards ${method} ${target} to v2`, async () => { |
no test coverage detected