MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / setup

Function setup

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

Source from the content-addressed store, hash-verified

133 let handler: ToolHandler;
134
135 const setup = async (files: Record<string, string>, include: string[]) => {
136 testDir = fs.mkdtempSync(path.join(os.tmpdir(), 'codegraph-boundary-'));
137 const src = path.join(testDir, 'src');
138 fs.mkdirSync(src, { recursive: true });
139 for (const [name, content] of Object.entries(files)) {
140 fs.writeFileSync(path.join(src, name), content);
141 }
142 cg = CodeGraph.initSync(testDir, { config: { include, exclude: [] } });
143 await cg.indexAll();
144 handler = new ToolHandler(cg);
145 };
146
147 afterEach(() => {
148 if (cg) cg.destroy();

Callers 1

Calls 3

initSyncMethod · 0.80
joinMethod · 0.45
indexAllMethod · 0.45

Tested by

no test coverage detected