(prefix: string, files: Record<string, string>)
| 17 | import { CodeGraph } from '../src'; |
| 18 | |
| 19 | function writeProject(prefix: string, files: Record<string, string>): string { |
| 20 | const root = fs.mkdtempSync(path.join(os.tmpdir(), prefix)); |
| 21 | for (const [rel, content] of Object.entries(files)) { |
| 22 | fs.mkdirSync(path.dirname(path.join(root, rel)), { recursive: true }); |
| 23 | fs.writeFileSync(path.join(root, rel), content); |
| 24 | } |
| 25 | return root; |
| 26 | } |
| 27 | |
| 28 | /** |
| 29 | * `name -> target qualified name` for every reference the named function or |
no test coverage detected