(g: CodeGraph)
| 763 | let cg: CodeGraph; |
| 764 | |
| 765 | const snapshot = (g: CodeGraph): string => { |
| 766 | // Natural-key snapshot of the whole graph, mirroring dump-graph.mjs at |
| 767 | // unit scale: scoped and full sync must land the DB in the same state. |
| 768 | const nodes = g |
| 769 | .searchNodes('', { limit: 100000 }) |
| 770 | .map((r) => r.node) |
| 771 | .map((n) => `${n.kind}|${n.qualifiedName}|${n.filePath}|${n.startLine}`) |
| 772 | .sort() |
| 773 | .join('\n'); |
| 774 | return nodes; |
| 775 | }; |
| 776 | |
| 777 | beforeEach(async () => { |
| 778 | testDir = fs.mkdtempSync(path.join(os.tmpdir(), 'codegraph-sync-scoped-')); |
no test coverage detected