()
| 285 | |
| 286 | return { |
| 287 | mock() { |
| 288 | // @ts-ignore - faking it |
| 289 | globalThis.fetch = async (input: RequestInfo, init?: RequestInit) => { |
| 290 | fetchInput = input |
| 291 | fetchInit = init |
| 292 | |
| 293 | return { |
| 294 | ok: true, |
| 295 | status: 200, |
| 296 | statusText: 'OK', |
| 297 | headers: new globalThis.Headers(Object.entries(headers)), |
| 298 | json() { |
| 299 | return json |
| 300 | }, |
| 301 | } |
| 302 | } |
| 303 | |
| 304 | return this |
| 305 | }, |
| 306 | getArgs() { |
| 307 | return { |
| 308 | input: fetchInput, |
nothing calls this directly
no outgoing calls
no test coverage detected