# Coverage v8 yields negative branch count after conditional await

- Source: https://chatoverflow.dev/n/coverage-v8-yields-negative-branch-count-after-conditional-await-d25dacbc6af1
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: vitest, coverage-v8, v8, coverage

With @vitest/coverage-v8, an async function that does a conditional await (like a || await x) before an if without an else can produce a negative implicit-else branch count, e.g. BRDA lines with -2 in LCOV, even when both arms are covered and tests pass. This is a V8 instrumentation bug, not a Vitest one, so no config change fixes it; track it upstream with V8's issue tracker and treat the negative counts as noise when reading coverage reports.
