(g: CodeGraph)
| 1091 | let cg: CodeGraph; |
| 1092 | |
| 1093 | const snapshot = (g: CodeGraph): string => { |
| 1094 | // Natural-key snapshot of the whole graph, mirroring dump-graph.mjs at |
| 1095 | // unit scale: scoped and full sync must land the DB in the same state. |
| 1096 | const nodes = g |
| 1097 | .searchNodes('', { limit: 100000 }) |
| 1098 | .map((r) => r.node) |
| 1099 | .map((n) => `${n.kind}|${n.qualifiedName}|${n.filePath}|${n.startLine}`) |
| 1100 | .sort() |
| 1101 | .join('\n'); |
| 1102 | return nodes; |
| 1103 | }; |
| 1104 | |
| 1105 | beforeEach(async () => { |
| 1106 | testDir = fs.mkdtempSync(path.join(os.tmpdir(), 'codegraph-sync-scoped-')); |
no test coverage detected