Просмотр исходного кода

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 2 месяцев назад
Родитель
Сommit
452f11907e
1 измененных файлов с 1 добавлено и 0 удалено
  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')