(files: Record<string, string>)
| 167 | let kernel: string | undefined; |
| 168 | |
| 169 | async function project(files: Record<string, string>): Promise<CodeGraph> { |
| 170 | const root = fs.mkdtempSync(path.join(os.tmpdir(), 'cg-member-value-module-function-')); |
| 171 | roots.push(root); |
| 172 | for (const [rel, content] of Object.entries(files)) { |
| 173 | fs.mkdirSync(path.dirname(path.join(root, rel)), { recursive: true }); |
| 174 | fs.writeFileSync(path.join(root, rel), content); |
| 175 | } |
| 176 | return CodeGraph.init(root, { index: true }); |
| 177 | } |
| 178 | |
| 179 | beforeAll(async () => { |
| 180 | kernel = process.env.CODEGRAPH_KERNEL; |
no test coverage detected