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

Function callsFrom

__tests__/same-module-copy-resolution.test.ts:51–55  ·  view source on GitHub ↗
(fnName: string, filePath: string)

Source from the content-addressed store, hash-verified

49 });
50
51 async function callsFrom(fnName: string, filePath: string) {
52 const caller = cg!.getNodesByKind('function').find((n) => n.name === fnName && n.filePath === filePath);
53 expect(caller).toBeDefined();
54 return cg!.getOutgoingEdges(caller!.id).filter((e) => e.kind === 'calls');
55 }
56
57 function fn(name: string, filePath: string) {
58 const node = cg!.getNodesByKind('function').find((n) => n.name === name && n.filePath === filePath);

Calls 2

getNodesByKindMethod · 0.65
getOutgoingEdgesMethod · 0.45

Tested by

no test coverage detected