Repository navigation
test: exclude test/** from coverage on every Node leg and ratchet thresholds to 99/96/98 - #262
Merged
Merged
Conversation
…esholds to 99/96/98 Node 24+ drops test files from the --experimental-test-coverage report by default; Node 22 does not. The three matrix legs were therefore gating different aggregates: on Node 22 the functions threshold (97) had a 0.2 point margin while on Node 26 it had 2.4. Pass --test-coverage-exclude so every leg measures dist/ + scripts/ only, then ratchet lines/branches/ functions from 98/93/97 to 99/96/98 against the now-identical 99.68/97.92/ 99.37 aggregate. A new runner test pins the thresholds CONTRIBUTING.md documents to the ones the runner enforces. The package.json test:coverage alias is left for a follow-up: an open PR already edits package.json and the hub refuses a second App-bot PR over the same file while it is open. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: quality <quality@hive.kubestellar.io>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
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.
Test Improvement
npm test(scripts/run-tests.mjs) gates line/branch/function coverage on every CI leg (Node 22/24/26). Two problems surfaced while measuring:--experimental-test-coveragereport by default; Node 22 does not. On Node 22 the report includedtest/*.test.js, so the functions gate (97) had a 0.2-point margin (97.20%) while on Node 26 it had 2.4 — a harmless test-only refactor could have gone red on Node 22 alone. This PR passes--test-coverage-exclude=test/**so every leg measuresdist/+scripts/only.A new runner test pins the thresholds CONTRIBUTING.md documents to the ones
COVERAGE_FLAGSenforces, so the two cannot drift. CONTRIBUTING.md now describesnpm test(Node ≥ 22) as the coverage gate, matching CI.Deferred, not forgotten
package.json'stest:coveragealias still carries the old flags (98/93/97, no exclude). #259 currently editspackage.jsonand the hub refuses a second App-bot PR over the same file while it is open; the one-line alias update will follow once #259 lands. CI is unaffected — it runs the runner, not the alias.Verification
npm test→ 341 pass, all files 99.68 / 97.92 / 99.37, exit 0node scripts/run-tests.mjs→ 341 pass, all files 99.68 / 97.92 / 99.37, exit 095.84% branch coverage does not meet threshold of 96%,97.20% function coverage does not meet threshold of 98%No
changelog.dfragment: test-infrastructure only, no user-visible change.Filed by quality agent (ACMM L4/L6 — full mode)
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88