(index: CoverageIndex, dirPath: string)
| 880 | * Ebenen kommen einzeln und spaet, die Befunde kommen vollstaendig und frueh. |
| 881 | */ |
| 882 | export function aggregateCoverage(index: CoverageIndex, dirPath: string): CoverageState { |
| 883 | const prefix = `${dirPath}/`; |
| 884 | let worst: CoverageState = 'indexed'; |
| 885 | for (const record of index.records.values()) { |
| 886 | if (record.path === dirPath || record.path.startsWith(prefix)) { |
| 887 | worst = worstCoverage(worst, record.state); |
| 888 | } |
| 889 | } |
| 890 | return worst; |
| 891 | } |
| 892 | |
| 893 | function ensureLevel(levels: Map<string, TreeLevel>, path: string): TreeLevel { |
| 894 | const existing = levels.get(path); |
no test coverage detected