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

Function callsFrom

__tests__/lua-local-alias-calls.test.ts:92–102  ·  view source on GitHub ↗

`file: qualified name` of every call edge out of a file.

(file: string)

Source from the content-addressed store, hash-verified

90
91/** `file: qualified name` of every call edge out of a file. */
92function callsFrom(file: string): string[] {
93 const ids = cg.getNodesInFile(file).map((n) => n.id);
94 return cg
95 .getOutgoingEdgesFrom(ids)
96 .filter((e) => e.kind === 'calls')
97 .map((e) => {
98 const t = cg.getNode(e.target)!;
99 return `${t.filePath}: ${t.qualifiedName}`;
100 })
101 .sort();
102}
103
104describe('bare Lua calls through a local alias', () => {
105 it('reach the module function the alias names, and nothing for the standard library', () => {

Callers 1

Calls 4

mapMethod · 0.80
getNodeMethod · 0.80
getNodesInFileMethod · 0.65
getOutgoingEdgesFromMethod · 0.45

Tested by

no test coverage detected