( dir: string, )
| 39 | const fixtureDir = join(repoRoot, 'tests', 'fixtures', 'python', 'project'); |
| 40 | |
| 41 | async function readAllFiles( |
| 42 | dir: string, |
| 43 | ): Promise<Array<{ path: string; content: string }>> { |
| 44 | const entries = await readdir(dir, { withFileTypes: true }); |
| 45 | const results: Array<{ path: string; content: string }> = []; |
| 46 | for (const entry of entries) { |
| 47 | const fullPath = join(dir, entry.name); |
| 48 | if (entry.isDirectory()) { |
| 49 | results.push(...(await readAllFiles(fullPath))); |
| 50 | } else { |
| 51 | results.push({ |
| 52 | path: relative(dir, fullPath), |
| 53 | content: await readFile(fullPath, 'utf-8'), |
| 54 | }); |
| 55 | } |
| 56 | } |
| 57 | return results; |
| 58 | } |
| 59 | |
| 60 | function runAndCollect( |
| 61 | files: Array<{ path: string; content: string }>, |
no test coverage detected