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

Function callsFrom

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

Source from the content-addressed store, hash-verified

1185 }
1186 }
1187 const callsFrom = (qualifiedName: string) => {
1188 const from = cg.getNodesByKind('method').find((n) => n.qualifiedName === qualifiedName);
1189 expect(from, qualifiedName).toBeDefined();
1190 return cg
1191 .getOutgoingEdges(from!.id)
1192 .filter((e) => e.kind === 'calls')
1193 .map((e) => ({
1194 target: cg.getNode(e.target)?.qualifiedName,
1195 resolvedBy: (e.metadata as { resolvedBy?: string } | undefined)?.resolvedBy,
1196 provenance: e.provenance ?? undefined, // a resolved (non-synthesized) edge stores NULL
1197 }));
1198 };
1199
1200 it("resolves `self.field.method()` to the method on the field's declared type, never to the caller itself (#1585)", async () => {
1201 // The issue's repro: `Outer::run` forwards to `Inner::run` through the

Callers 1

resolution.test.tsFile · 0.85

Calls 3

getNodeMethod · 0.80
getNodesByKindMethod · 0.65
getOutgoingEdgesMethod · 0.45

Tested by

no test coverage detected