Skip to content

Commit 319ef30

Browse files
committed
docs(coverage): name the two defects whose counts can merge into a clean record
1 parent 4ebc750 commit 319ef30

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎scripts/coverage-crap/model.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@ function countsAreValid(record: IstanbulCounters): boolean {
8787
* `ast-v8-to-istanbul` subtracts located branch paths from a region that did not contain them,
8888
* which an awaited continuation can make negative. Vitest 5 fixed the other upstream (#10506,
8989
* #10643): the v8 provider used to resolve a module's script wrapper length from whichever coverage
90-
* file it read last, so an unmeasured one shifted every offset off its source. Any rule can also
91-
* merge into a record measured correctly and pull its counts down, so a record is dropped whole
92-
* rather than repaired; zeroed counts from the same shift are indistinguishable from untested code
93-
* and stay. A dropped file gets no CRAP score rather than a wrong one.
90+
* file it read last, so an unmeasured one shifted every offset off its source. Either defect's
91+
* counts could also merge into a record measured correctly and pull them down, so a record is
92+
* dropped whole rather than repaired; zeroed counts from the same shift are indistinguishable from
93+
* untested code and stay. A dropped file gets no CRAP score rather than a wrong one.
9494
*/
9595
export function sanitizeIstanbulCoverage(map: IstanbulCoverageMap): SanitizedCoverage {
9696
const kept: Record<string, IstanbulCounters> = {};

0 commit comments

Comments
 (0)