(mockApiCall?: RequestInit)
| 5 | import { ApiError } from '../utils/ApiError'; |
| 6 | |
| 7 | function parseRequestPayload(mockApiCall?: RequestInit) { |
| 8 | if (!mockApiCall) { |
| 9 | throw new Error('Unable to parse request payload. The mock API call is undefined.'); |
| 10 | } |
| 11 | return JSON.parse(mockApiCall.body as string); |
| 12 | } |
| 13 | |
| 14 | async function setupStacSearch() { |
| 15 | const { result } = renderHook(() => useStacSearch(), { wrapper }); |