MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / makeCtx

Function makeCtx

test/mcp-scaffold.test.ts:9–19  ·  view source on GitHub ↗
(cwd: string)

Source from the content-addressed store, hash-verified

7import type { ToolContext } from '../src/tools/base.js';
8
9function makeCtx(cwd: string): ToolContext {
10 return {
11 cwd,
12 sessionId: 'test',
13 transaction: {} as any,
14 permissions: { check: () => ({ ok: true }) } as any,
15 askUser: async () => 'allow',
16 signal: new AbortController().signal,
17 emit: () => {},
18 } as ToolContext;
19}
20
21describe('scaffoldMcpServer', () => {
22 let tmp: string;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected