(method: string, target: string)
| 157 | /** Run one contract case through v1's edge with the shipped settings and a |
| 158 | * stand-in for v2's Worker that records every call. */ |
| 159 | const runCase = async (method: string, target: string) => { |
| 160 | const calls: Request[] = []; |
| 161 | const v2: V2Service = { |
| 162 | fetch: (request) => { |
| 163 | calls.push(request); |
| 164 | return Promise.resolve(new Response("v2")); |
| 165 | }, |
| 166 | }; |
| 167 | const request = new Request(`${contract.origin}${target}`, { method }); |
| 168 | const response = await v2EdgeResponse(request, { ...shipped, V2: v2 }); |
| 169 | return { request, calls, response }; |
| 170 | }; |
| 171 | |
| 172 | const forwarded = contract.cases.filter((c) => c.forwards); |
| 173 | const signUps = contract.cases.filter((c) => !c.forwards && SIGN_UP_TARGETS.has(c.target)); |
no test coverage detected