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

Function fn

__tests__/cpp-macro-include-walk.test.ts:116–116  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

114 const cg = await CodeGraph.init(root, { index: true });
115 try {
116 const fn = (name: string) => cg.getNodesByKind('function').find((n) => n.name === name)!;
117 const callees = (name: string) =>
118 cg.getCallees(fn(name).id).filter((r) => r.edge.kind === 'calls').map((r) => r.node.filePath);
119 expect(callees('unit')).toEqual([]);

Callers 1

calleesFunction · 0.70

Calls 1

getNodesByKindMethod · 0.65

Tested by

no test coverage detected