(root: string, files: Record<string, string>)
| 17 | import { CodeGraph } from '../src'; |
| 18 | |
| 19 | function writeTree(root: string, files: Record<string, string>): void { |
| 20 | for (const [rel, content] of Object.entries(files)) { |
| 21 | fs.mkdirSync(path.dirname(path.join(root, rel)), { recursive: true }); |
| 22 | fs.writeFileSync(path.join(root, rel), content); |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | /** `<line> -> <target>` for every `imports` edge out of `file`: a file by its path, anything else by kind, file and name. */ |
| 27 | function importsFrom(cg: CodeGraph, file: string): string[] { |
no test coverage detected