( fetchMock: FetchMock, index = 0, )
| 21 | } |
| 22 | |
| 23 | export function getFetchCall( |
| 24 | fetchMock: FetchMock, |
| 25 | index = 0, |
| 26 | ): [string, RequestInit] { |
| 27 | const [url, init] = fetchMock.mock.calls[index] as [string, RequestInit]; |
| 28 | return [url, init ?? {}]; |
| 29 | } |
| 30 | |
| 31 | export function getJsonBody(init: RequestInit): Record<string, unknown> { |
| 32 | return JSON.parse(String(init.body ?? "{}")) as Record<string, unknown>; |
no outgoing calls
no test coverage detected