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

Function calls

__tests__/rust-path-attribute-modules.test.ts:118–123  ·  view source on GitHub ↗
(file: string, name: string)

Source from the content-addressed store, hash-verified

116});
117
118const calls = (file: string, name: string): string[] => {
119 const fn = cg.getNodesInFile(file).find((n) => n.name === name && n.kind === 'function');
120 expect(fn, `${file}:${name}`).toBeDefined();
121 return cg.getOutgoingEdgesFrom([fn!.id]).filter((e) => e.kind === 'calls')
122 .map((e) => cg.getNode(e.target)!).map((t) => `${t.qualifiedName} ${t.filePath}:${t.startLine}`).sort();
123};
124
125describe('Rust modules a #[path] attribute loads', () => {
126 it('see the declaring module\'s private items through `use super::*`', () => {

Calls 4

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

Tested by

no test coverage detected