test: reach 100% coverage on all 4 V8 metrics#591
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
v8 ignorecommentsTest plan
npx vitest run --coveragereports 100% on Statements, Branches, Functions, and Lines