(name: string)
| 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'); |
no test coverage detected