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

Function makeCtx

test/git-tools.test.ts:13–23  ·  view source on GitHub ↗
(cwd: string)

Source from the content-addressed store, hash-verified

11import type { ToolContext } from '../src/tools/base.js';
12
13function makeCtx(cwd: string): ToolContext {
14 return {
15 cwd,
16 sessionId: 'test',
17 transaction: {} as any,
18 permissions: { check: () => ({ ok: true }) } as any,
19 askUser: async () => 'allow',
20 signal: new AbortController().signal,
21 emit: () => {},
22 } as ToolContext;
23}
24
25/** Run a git command synchronously in the given dir for test setup. */
26function gitSetup(cwd: string, args: string[]): void {

Callers 1

git-tools.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected