MCPcopy
hub / github.com/anomalyco/opencode / client

Function client

packages/opencode/test/server/sdk-error-shape.test.ts:21–27  ·  view source on GitHub ↗
(directory: string)

Source from the content-addressed store, hash-verified

19})
20
21function client(directory: string) {
22 return createOpencodeClient({
23 baseUrl: "http://test",
24 directory,
25 fetch: ((req: Request) => Server.Default().app.fetch(req)) as unknown as typeof fetch,
26 })
27}
28
29describe("v2 SDK error shape", () => {
30 test("404 with NamedError body throws a real Error carrying the server message", async () => {

Callers 1

Calls 2

createOpencodeClientFunction · 0.90
fetchMethod · 0.80

Tested by

no test coverage detected