(files: Record<string, string>)
| 19 | afterEach(() => { cg?.close(); cg = undefined; fs.rmSync(root, { recursive: true, force: true }); }); |
| 20 | |
| 21 | async function index(files: Record<string, string>) { |
| 22 | fs.mkdirSync(path.join(root, 'src')); |
| 23 | fs.writeFileSync(path.join(root, 'Cargo.toml'), '[package]\nname = "repro"\nversion = "0.1.0"\nedition = "2021"\n'); |
| 24 | for (const [file, text] of Object.entries(files)) fs.writeFileSync(path.join(root, 'src', file), text); |
| 25 | cg = await CodeGraph.init(root, { index: true }); |
| 26 | } |
| 27 | |
| 28 | /** The enum named `name` declared in `src/<file>`. */ |
| 29 | function enumIn(file: string, name = 'Mode') { |
no test coverage detected