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

Function links

__tests__/ts-dollar-method-calls.test.ts:103–107  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

101 const graph = await CodeGraph.init(root, { index: true });
102 graphs.push(graph);
103 const links = () => {
104 const nodes = graph.getFiles().flatMap((f) => graph.getNodesInFile(f.path));
105 return graph.getOutgoingEdgesFrom(nodes.map((n) => n.id), ['calls'])
106 .map((e) => `${e.metadata?.refName} -> ${graph.getNode(e.target)?.qualifiedName}`);
107 };
108 expect(links()).toEqual([]);
109
110 write(root, service);

Callers 1

Calls 5

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

Tested by

no test coverage detected