MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / responseJson

Function responseJson

apps/cli/src/device-login.test.ts:18–22  ·  view source on GitHub ↗
(body: Record<string, unknown>, status = 200)

Source from the content-addressed store, hash-verified

16}
17
18const responseJson = (body: Record<string, unknown>, status = 200): Response =>
19 new Response(JSON.stringify(body), {
20 status,
21 headers: { "content-type": "application/json" },
22 });
23
24const installFetch = (handler: (url: string, init: RequestInit | undefined) => Response) => {
25 globalThis.fetch = ((input: RequestInfo | URL, init?: RequestInit) => {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected