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

Function callsFrom

__tests__/resolution.test.ts:1256–1267  ·  view source on GitHub ↗
(qualifiedName: string)

Source from the content-addressed store, hash-verified

1254 }
1255 }
1256 const callsFrom = (qualifiedName: string) => {
1257 const from = cg.getNodesByKind('method').find((n) => n.qualifiedName === qualifiedName);
1258 expect(from, qualifiedName).toBeDefined();
1259 return cg
1260 .getOutgoingEdges(from!.id)
1261 .filter((e) => e.kind === 'calls')
1262 .map((e) => ({
1263 target: cg.getNode(e.target)?.qualifiedName,
1264 resolvedBy: (e.metadata as { resolvedBy?: string } | undefined)?.resolvedBy,
1265 provenance: e.provenance ?? undefined, // a resolved (non-synthesized) edge stores NULL
1266 }));
1267 };
1268
1269 it("resolves `self.field.method()` to the method on the field's declared type, never to the caller itself (#1585)", async () => {
1270 // The issue's repro: `Outer::run` forwards to `Inner::run` through the

Callers 1

resolution.test.tsFile · 0.70

Calls 4

mapMethod · 0.80
getNodeMethod · 0.80
getNodesByKindMethod · 0.65
getOutgoingEdgesMethod · 0.45

Tested by

no test coverage detected