Cover the action entrypoint in Vitest coverage#853
Merged
Conversation
🎉 Happy commit!
|
gh-counterPR gate
Repo dashboard
Reported by gh-counter |
Code Metrics Report
Details | | main (4ff7c64) | #853 (bb326f1) | +/- |
|---------------------|----------------|----------------|-------|
- | Coverage | 99.2% | 97.6% | -1.7% |
| Files | 5 | 7 | +2 |
| Lines | 134 | 170 | +36 |
+ | Covered | 133 | 166 | +33 |
+ | Code to Test Ratio | 1:1.3 | 1:1.6 | +0.2 |
| Code | 714 | 714 | 0 |
+ | Test | 966 | 1180 | +214 |
| Test Execution Time | 1s | 1s | 0s |Code coverage of files in pull request scope (0.0% → 91.6%)
Reported by octocov |
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
Cover the action entrypoint in Vitest coverage
Add a dedicated
src/index.spec.tsthat imports the action entrypoint undermocks and exercises the reachable
src/index.tsbranches for the normalpath, legacy input aliases, invalid
max-expected-occurrences, anddownstream failure handling. Make Vitest coverage explicitly include
src/**/*.tswhile excluding*.spec.tsso the published coverage reportkeeps the action entrypoint visible even when it is only reached through
import-time execution.
Chosen fix
This is the smallest safe plan that fixes the finding at its source: the
published coverage should represent the real action entrypath. It stays
within the repo's existing Vitest coverage setup, avoids repository-settings
changes, does not weaken any quality gate, and does not require a broader
refactor of action orchestration. Adding only coverage inclusion would
expose the gap but leave the main path untested; adding only tests would
cover today's file but still rely on implicit inclusion behavior. Doing
both keeps the change local and durable.