* List immediate subdirectories of workPath (non-hidden).
(workPath: string)
| 357 | * List immediate subdirectories of workPath (non-hidden). |
| 358 | */ |
| 359 | async function getSubdirectories(workPath: string): Promise<string[]> { |
| 360 | try { |
| 361 | const entries = await fs.promises.readdir(workPath, { |
| 362 | withFileTypes: true, |
| 363 | }); |
| 364 | return entries |
| 365 | .filter(e => e.isDirectory() && !e.name.startsWith('.')) |
| 366 | .map(e => e.name) |
| 367 | .sort(); |
| 368 | } catch { |
| 369 | return []; |
| 370 | } |
| 371 | } |
| 372 | |
| 373 | function makeDiagnosticError( |
| 374 | framework: string, |
no test coverage detected