Quellcode durchsuchen

test(ui-primitives): exclude DiffBlock's assertNever default arm from coverage

The copyText switch's default arm calls assertNever, the closed-union
backstop that the per-file 100% coverage gate cannot reach without a
forged row kind. The assertNever function itself already carries the
v8 ignore; mark the switch arm that reaches it the same way, matching
TodoPanel's StatusGlyph default arm.
Chinesezjc vor 2 Monaten
Ursprung
Commit
452f11907e
1 geänderte Dateien mit 1 neuen und 0 gelöschten Zeilen
  1. 1 0
      packages/client/ui-primitives/src/DiffBlock.tsx

+ 1 - 0
packages/client/ui-primitives/src/DiffBlock.tsx

@@ -128,6 +128,7 @@ function copyText(rows: DiffRow[]): string {
       case 'add': return `+ ${row.text}`
       case 'path': return row.text
       case 'gap': return row.text
+      /* v8 ignore next -- closed-union backstop; only reached if a row kind is forged */
       default: return assertNever(row.kind)
     }
   }).join('\n')