MCPcopy Create free account
hub / github.com/anomalyco/opencode / json

Function json

packages/opencode/test/share/share-next.test.ts:25–32  ·  view source on GitHub ↗
(req: Parameters<typeof HttpClientResponse.fromWeb>[0], body: unknown, status = 200)

Source from the content-addressed store, hash-verified

23const it = testEffect(env)
24
25const json = (req: Parameters<typeof HttpClientResponse.fromWeb>[0], body: unknown, status = 200) =>
26 HttpClientResponse.fromWeb(
27 req,
28 new Response(JSON.stringify(body), {
29 status,
30 headers: { "content-type": "application/json" },
31 }),
32 )
33
34const none = HttpClient.make(() => Effect.die("unexpected http call"))
35

Callers 1

share-next.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected