(files: Record<string, string>)
| 16 | let cg: CodeGraph | null = null; |
| 17 | |
| 18 | async function index(files: Record<string, string>): Promise<void> { |
| 19 | tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'codegraph-2957-')); |
| 20 | for (const [rel, source] of Object.entries(files)) { |
| 21 | fs.mkdirSync(path.dirname(path.join(tempDir, rel)), { recursive: true }); |
| 22 | fs.writeFileSync(path.join(tempDir, rel), source); |
| 23 | } |
| 24 | cg = await CodeGraph.init(tempDir, { index: true }); |
| 25 | } |
| 26 | |
| 27 | afterEach(() => { |
| 28 | cg?.close(); |
no test coverage detected