MCPcopy
hub / github.com/colbymchenry/codegraph / setup

Function setup

__tests__/dynamic-boundaries.test.ts:148–158  ·  view source on GitHub ↗
(files: Record<string, string>, include: string[])

Source from the content-addressed store, hash-verified

146 let handler: ToolHandler;
147
148 const setup = async (files: Record<string, string>, include: string[]) => {
149 testDir = fs.mkdtempSync(path.join(os.tmpdir(), 'codegraph-boundary-'));
150 const src = path.join(testDir, 'src');
151 fs.mkdirSync(src, { recursive: true });
152 for (const [name, content] of Object.entries(files)) {
153 fs.writeFileSync(path.join(src, name), content);
154 }
155 cg = CodeGraph.initSync(testDir, { config: { include, exclude: [] } });
156 await cg.indexAll();
157 handler = new ToolHandler(cg);
158 };
159
160 afterEach(() => {
161 if (cg) cg.destroy();

Callers 1

Calls 3

joinMethod · 0.80
initSyncMethod · 0.80
indexAllMethod · 0.45

Tested by

no test coverage detected