(dir: string, symbol: string)
| 34 | } |
| 35 | |
| 36 | async function makeProject(dir: string, symbol: string): Promise<void> { |
| 37 | fs.mkdirSync(path.join(dir, 'src'), { recursive: true }); |
| 38 | fs.writeFileSync(path.join(dir, 'src', 'sample.ts'), `export function ${symbol}() { return 1; }\n`); |
| 39 | const cg = await CodeGraph.init(dir, { config: { include: ['**/*.ts'], exclude: [] } }); |
| 40 | await cg.indexAll(); |
| 41 | cg.close(); |
| 42 | } |
| 43 | |
| 44 | async function waitFor(check: () => Promise<boolean>, timeoutMs: number): Promise<boolean> { |
| 45 | const deadline = Date.now() + timeoutMs; |
no test coverage detected