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

Function callsIn

__tests__/external-declared-receiver.test.ts:63–66  ·  view source on GitHub ↗
(file: string, fn: string)

Source from the content-addressed store, hash-verified

61});
62
63const callsIn = (file: string, fn: string): string[] => {
64 const node = cg.getNodesInFile(file).find((n) => n.name === fn)!;
65 return cg.getOutgoingEdges(node.id).filter((e) => e.kind === 'calls').map((e) => cg.getNode(e.target)!.qualifiedName);
66};
67
68describe('a receiver declared with an outside type', () => {
69 it('Java: `List<String> list` calls List.add, not a project class’s add', () => {

Calls 4

mapMethod · 0.80
getNodeMethod · 0.80
getNodesInFileMethod · 0.65
getOutgoingEdgesMethod · 0.45

Tested by

no test coverage detected