(response: Response)
| 23 | } |
| 24 | |
| 25 | function mockFetch(response: Response): typeof fetch { |
| 26 | return mock<typeof fetch>().mockResolvedValue( |
| 27 | response, |
| 28 | ) as unknown as typeof fetch; |
| 29 | } |
| 30 | |
| 31 | function calledRequest(f: typeof fetch) { |
| 32 | const [url, init] = (f as unknown as Mock<typeof fetch>).mock.calls[0] ?? []; |
no outgoing calls
no test coverage detected