Skip to content

test: reach 100% coverage on all 4 V8 metrics#591

Merged
merencia merged 2 commits into
mainfrom
test/100-percent-coverage
Jun 25, 2026
Merged

test: reach 100% coverage on all 4 V8 metrics#591
merencia merged 2 commits into
mainfrom
test/100-percent-coverage

Conversation

@merencia

Copy link
Copy Markdown
Member

Summary

  • Add targeted tests for previously uncovered branches, functions, and statements across 15 files (runner, daemon, background-scheduled-task, logger, localized-time, plan-beat, validate-day, node-cron)
  • Mark genuinely unreachable defensive guards (optional chaining on always-defined values, catch blocks for internally-handled errors) with v8 ignore comments
  • All 4 V8 coverage metrics now at 100%: Statements (1060/1060), Branches (500/500), Functions (269/269), Lines (977/977)

Test plan

  • All 666 tests pass
  • npx vitest run --coverage reports 100% on Statements, Branches, Functions, and Lines
  • No files appear in the "Uncovered Line #s" column

merencia added 2 commits June 25, 2026 14:49
Add targeted tests for previously uncovered branches, functions, and
statements across runner, daemon, background-scheduled-task, logger,
localized-time, plan-beat, validate-day, and node-cron modules.

Mark genuinely unreachable defensive guards (optional chaining on
always-defined values, catch blocks for internally-handled errors) with
v8 ignore comments so V8 implicit branches do not drag metrics below
100%.

Statements: 100%, Branches: 100%, Functions: 100%, Lines: 100%.
…omplete catch

- daemon.test.ts: sendEvent test used .find() which could pick up a stale
  listener from a prior bind() call; switched to .filter().pop() to match
  the pattern used by the other new tests
- runner.ts: removed v8 ignore on the onComplete catch block and added a
  proper test with a throwing coordinator instead
@merencia merencia merged commit 367a5fc into main Jun 25, 2026
7 checks passed
@merencia merencia deleted the test/100-percent-coverage branch June 25, 2026 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant