MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / routesFor

Function routesFor

graph-ui/src/architecture/semantic-graph.test.ts:374–377  ·  view source on GitHub ↗
(prefix: string)

Source from the content-addressed store, hash-verified

372 expect(grouped.nodes.filter(item => item.kind === 'route').map(item => item.label).sort())
373 .toEqual(['/', '/', '/', '/accounts · 3', '/admin · 2', '/admin_views/x/', '/login/']);
374 const routesFor = (prefix: string) => {
375 const model = buildSemanticGraph(graph, { ...options, filter: prefix });
376 return model.nodes.filter(item => item.kind === 'route').map(item => item.label).sort();
377 };
378 for (const group of grouped.nodes.filter(item => item.routePrefix)) {
379 expect(routesFor(group.routePrefix!)).toEqual(group.members.map(member => member.name).sort());
380 expect(routesFor(group.routePrefix!)).toHaveLength(group.count);

Callers 1

Calls 1

buildSemanticGraphFunction · 0.90

Tested by

no test coverage detected