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

Function routeCalls

__tests__/route-inline-handler-calls.test.ts:58–65  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

56});
57
58const routeCalls = (name: string) => {
59 const route = cg.getNodesByKind('route').find((r) => r.name.endsWith(name));
60 if (!route) return [];
61 return cg.getOutgoingEdges(route.id).filter((e) => e.kind === 'calls').map((e) => {
62 const t = cg.getNode(e.target)!;
63 return `${t.filePath}: ${t.qualifiedName}`;
64 }).sort();
65};
66
67describe('inline route handler calls', () => {
68 it('are not a same-named method of an unrelated type', () => {

Calls 4

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

Tested by

no test coverage detected