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

Function edges

__tests__/function-ref.test.ts:1503–1504  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1501 fs.writeFileSync(path.join(tmpDir, 'consumer.py'), consumer);
1502 const cg = CodeGraph.initSync(tmpDir);
1503 const edges = () => cg.getNodesByName('fetch').flatMap(t => cg.getIncomingEdges(t.id)
1504 .filter(e => e.metadata?.fnRef === true).map(e => `${cg.getNode(e.source)?.name} -> ${t.qualifiedName}`));
1505 try {
1506 await cg.indexAll();
1507 expect(edges()).toEqual(['cb -> Store::fetch']);

Callers 1

Calls 4

mapMethod · 0.80
getNodeMethod · 0.80
getNodesByNameMethod · 0.65
getIncomingEdgesMethod · 0.65

Tested by

no test coverage detected