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

Function callsFrom

__tests__/python-attr-chain.test.ts:39–47  ·  view source on GitHub ↗
(kind: 'function' | 'method', name: string)

Source from the content-addressed store, hash-verified

37 });
38
39 const callsFrom = (kind: 'function' | 'method', name: string) => {
40 const src = cg!.getNodesByKind(kind).find((n) => n.name === name);
41 expect(src).toBeDefined();
42 return cg!
43 .getOutgoingEdges(src!.id)
44 .filter((e) => e.kind === 'calls')
45 .map((e) => cg!.getNode(e.target)!)
46 .map((n) => `${n.kind}:${n.name}@${n.filePath.replace(/\\/g, '/')}`);
47 };
48
49 it('does not bind a self-attribute chain to an unrelated same-named method', async () => {
50 fs.writeFileSync(

Callers 2

resolvesFunction · 0.70

Calls 4

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

Tested by

no test coverage detected