(initial: Record<string, string>, edit: Record<string, string>, expected: string)
| 1258 | const IMPL = 'class N:\n def run(self):\n return 1\n'; |
| 1259 | |
| 1260 | async function editAndCompare(initial: Record<string, string>, edit: Record<string, string>, expected: string) { |
| 1261 | write(initial); |
| 1262 | cg = await CodeGraph.init(tempDir, { index: true }); |
| 1263 | write(edit); |
| 1264 | await cg.sync(); |
| 1265 | const fresh = await freshEdges(); |
| 1266 | expect(fresh).toContain(expected); |
| 1267 | expect(pythonEdges(cg)).toEqual(fresh); |
| 1268 | } |
| 1269 | |
| 1270 | it('adding a def of N moves the import off the submodule (E1)', () => |
| 1271 | editAndCompare( |
no test coverage detected