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

Function makeNode

graph-ui/src/architecture/RepositoryMap.test.tsx:13–14  ·  view source on GitHub ↗
(id: number, name: string, path: string)

Source from the content-addressed store, hash-verified

11 const container = document.createElement('div'); document.body.append(container);
12 const root = createRoot(container); const onNavigate = vi.fn(); const onSelect = vi.fn();
13 const makeNode = (id: number, name: string, path: string): GraphNode => ({ id, name, file_path: path,
14 start_line: 12, x: 0, y: 0, z: 0, label: 'Function', size: 1, color: '#fff' });
15 const graph: GraphData = { total_nodes: 2, nodes: [makeNode(1, 'serve', 'src/api/server.ts'), makeNode(2, 'save', 'src/store/db.ts')], edges: [{ source: 1, target: 2, type: 'CALLS' }] };
16 const overview: ArchitectureOverviewDto = { totalSymbols: 2, totalRelations: 1, symbolKinds: [], relationKinds: [], languages: [], groups: [], entryPoints: [], routes: [], clusters: [], layers: [], boundaries: [], hotspots: [], files: [] };
17 const click = async (text: string) => { const buttons = [...container.querySelectorAll('button')]; const button = buttons.find(button => button.textContent === text) ?? buttons.find(button => button.textContent?.includes(text)); expect(button, text).toBeTruthy(); await act(async () => button!.click()); };

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected