Index `before`, write `after` over it, sync; return the graph and what a full index of the final tree holds.
(before: Files, after: Files)
| 135 | |
| 136 | /** Index `before`, write `after` over it, sync; return the graph and what a full index of the final tree holds. */ |
| 137 | async function syncEdit(before: Files, after: Files): Promise<{ root: string; graph: CodeGraph; full: string[] }> { |
| 138 | const root = tempRoot(); |
| 139 | write(root, before); |
| 140 | const graph = await index(root); |
| 141 | write(root, after); |
| 142 | await graph.sync(); |
| 143 | const fullRoot = tempRoot(); |
| 144 | write(fullRoot, { ...before, ...after }); |
| 145 | return { root, graph, full: stateOf(fullRoot, await index(fullRoot)) }; |
| 146 | } |
| 147 | |
| 148 | describe('a sync follows a module-config change (#2977)', () => { |
| 149 | it('tsconfig paths retargeted, the importer untouched', async () => { |