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

Function fromRoute

__tests__/express-inline-function-handler.test.ts:85–89  ·  view source on GitHub ↗
(name: string, kind: string)

Source from the content-addressed store, hash-verified

83});
84
85const fromRoute = (name: string, kind: string) => {
86 const route = cg.getNodesByKind('route').find((r) => r.name === name);
87 expect(route, name).toBeDefined();
88 return cg.getOutgoingEdgesFrom([route!.id]).filter((e) => e.kind === kind).map((e) => cg.getNode(e.target)!.name);
89};
90
91describe('Express function-expression handlers', () => {
92 it('lend the route their calls', () => {

Calls 4

mapMethod · 0.80
getNodeMethod · 0.80
getNodesByKindMethod · 0.65
getOutgoingEdgesFromMethod · 0.45

Tested by

no test coverage detected