MCPcopy Create free account
hub / github.com/developmentseed/stac-react / parseRequestPayload

Function parseRequestPayload

src/hooks/useStacSearch.test.ts:7–12  ·  view source on GitHub ↗
(mockApiCall?: RequestInit)

Source from the content-addressed store, hash-verified

5import { ApiError } from '../utils/ApiError';
6
7function 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
14async function setupStacSearch() {
15 const { result } = renderHook(() => useStacSearch(), { wrapper });

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected