MCPcopy Index your code
hub / github.com/anomalyco/opencode / makeInput

Function makeInput

packages/opencode/test/plugin/xai.test.ts:17–32  ·  view source on GitHub ↗
(opts?: { failSet?: boolean })

Source from the content-addressed store, hash-verified

15}
16
17function makeInput(opts?: { failSet?: boolean }) {
18 const setCalls: Array<Record<string, unknown>> = []
19 return {
20 input: {
21 client: {
22 auth: {
23 set: async (req: Record<string, unknown>) => {
24 setCalls.push(req)
25 if (opts?.failSet) throw new Error("auth.set boom")
26 },
27 },
28 },
29 } as any,
30 setCalls,
31 }
32}
33
34function makeServer(handler: (request: Request, url: URL) => Response | Promise<Response>) {
35 return Bun.serve({

Callers 1

xai.test.tsFile · 0.70

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected