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

Function servedBy

__tests__/laravel-controller-strings.test.ts:58–62  ·  view source on GitHub ↗
(routeName: string)

Source from the content-addressed store, hash-verified

56});
57
58const servedBy = (routeName: string) => {
59 const route = cg.getNodesByKind('route').find((r) => r.name === routeName);
60 expect(route, routeName).toBeDefined();
61 return cg.getOutgoingEdgesFrom([route!.id]).map((e) => cg.getNode(e.target)!).map((n) => `${n.name} ${n.filePath}`);
62};
63
64describe('Laravel string controllers', () => {
65 it('resolve without a Controller suffix, by their namespace path', () => {

Calls 4

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

Tested by

no test coverage detected