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

Function handler

__tests__/flask-url-rules.test.ts:64–67  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

62 it('names each path and method, and links the view', () => {
63 const routes = cg.getNodesByKind('route').filter((r) => r.filePath === 'app/auth.py');
64 const handler = (name: string) => {
65 const route = routes.find((r) => r.name === name)!;
66 return cg.getOutgoingEdges(route.id).map((e) => cg.getNode(e.target)!.name);
67 };
68 expect(routes.map((r) => r.name).sort()).toEqual(['ANY /login', 'ANY /signin', 'GET /health', 'POST /logout']);
69 expect(handler('ANY /login')).toContain('Login');
70 expect(handler('POST /logout')).toContain('logout');

Callers 2

deliverFunction · 0.70

Calls 3

mapMethod · 0.80
getNodeMethod · 0.80
getOutgoingEdgesMethod · 0.45

Tested by

no test coverage detected