(id: number, name: string, path: string)
| 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()); }; |
no outgoing calls
no test coverage detected