Index `before`, write `after` over it, sync; return the graph and what a full index of the final tree holds.
(before: Files, after: Files)
| 161 | |
| 162 | /** Index `before`, write `after` over it, sync; return the graph and what a full index of the final tree holds. */ |
| 163 | async function syncEdit(before: Files, after: Files): Promise<{ root: string; graph: CodeGraph; full: string[] }> { |
| 164 | const root = tempRoot(); |
| 165 | write(root, before); |
| 166 | const graph = await index(root); |
| 167 | write(root, after); |
| 168 | await graph.sync(); |
| 169 | const fullRoot = tempRoot(); |
| 170 | write(fullRoot, { ...before, ...after }); |
| 171 | return { root, graph, full: stateOf(fullRoot, await index(fullRoot)) }; |
| 172 | } |
| 173 | |
| 174 | describe('a sync follows a module-config change (#2977)', () => { |
| 175 | it('tsconfig paths retargeted, the importer untouched', async () => { |