(files: Record<string, string>)
| 20 | }); |
| 21 | |
| 22 | async function indexed(files: Record<string, string>): Promise<{ cg: CodeGraph; root: string }> { |
| 23 | const root = fs.mkdtempSync(path.join(os.tmpdir(), 'codegraph-test-requests-')); |
| 24 | roots.push(root); |
| 25 | for (const [rel, content] of Object.entries(files)) { |
| 26 | fs.mkdirSync(path.dirname(path.join(root, rel)), { recursive: true }); |
| 27 | fs.writeFileSync(path.join(root, rel), content); |
| 28 | } |
| 29 | return { cg: await CodeGraph.init(root, { index: true }), root }; |
| 30 | } |
| 31 | |
| 32 | /** Every test-request edge as `test → route`. */ |
| 33 | function requests(cg: CodeGraph): string[] { |
no test coverage detected