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

Function staleIndex

__tests__/mcp-daemon.test.ts:181–188  ·  view source on GitHub ↗
(root: string)

Source from the content-addressed store, hash-verified

179}
180
181async function staleIndex(root: string): Promise<Buffer> {
182 fs.writeFileSync(path.join(root, 'app.ts'), 'export function originalSymbol() {}\n');
183 const cg = CodeGraph.openSync(root);
184 try { await cg.indexAll(); } finally { cg.close(); }
185 const before = fs.readFileSync(path.join(root, '.codegraph', 'codegraph.db'));
186 fs.writeFileSync(path.join(root, 'app.ts'), 'export function changedSymbol() {}\n');
187 return before;
188}
189
190describe('Shared MCP daemon (issue #411)', () => {
191 let tempDir: string; // the (possibly symlinked) path processes are spawned with

Callers 1

mcp-daemon.test.tsFile · 0.85

Calls 4

closeMethod · 0.65
joinMethod · 0.45
openSyncMethod · 0.45
indexAllMethod · 0.45

Tested by

no test coverage detected