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

Function makeCtx

test/infra-tools.test.ts:11–21  ·  view source on GitHub ↗
(cwd: string)

Source from the content-addressed store, hash-verified

9import { ToolRegistry } from '../src/tools/registry.js';
10
11function makeCtx(cwd: string): ToolContext {
12 return {
13 cwd,
14 sessionId: 'test',
15 transaction: {} as any,
16 permissions: { evaluate: () => 'allow' } as any,
17 askUser: async () => 'allow',
18 signal: new AbortController().signal,
19 emit: () => {},
20 } as ToolContext;
21}
22
23describe('runProcess helper', () => {
24 it('runs a present binary and captures stdout', async () => {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected