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