Repository navigation
test: cover useNavDropdowns guard branches and ratchet coverage thresholds - #357
Merged
hivecommons-hive[bot] merged 1 commit intoOct 17, 2026
Merged
Conversation
…holds Exercise the ten defensive branches in useNavDropdowns (sibling [data-dropdown] without a menu, unknown dropdown name, menu without a button, language switcher without a button, listbox visible with no prior hover, text nodes through the MutationObserver, listbox enter with no pending hide). The hook now reaches 100% branch coverage. Raise coverage.thresholds from 97/97/92/96 to 98/98/95/97; measured on main @ 996033f with this change is 99.69/100/97.19/99.15 (1113 tests). Closes #356 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 |
✅ Deploy Preview for hivecommons-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
kubestellar-prow
Bot
deleted the
quality/test-navdropdowns-guards-ratchet
branch
October 17, 2026 13:23
Contributor
Author
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
src/__tests__/useNavDropdowns.guards.test.tsxcovering the ten defensive branches insrc/components/navbar/useNavDropdowns.tsthat the existing suite left untouched (sibling[data-dropdown]without a menu, unknown dropdown name, menu without a[data-dropdown-button], language switcher without a<button>, listbox visible with no prior hover, text nodes through the MutationObserver, listbox mouseenter with no pending hide). The hook goes from 85.5% to 100% branch coverage.vitest.config.tsthresholds from 97/97/92/96 to 98/98/95/97 (same ~2pt margin as test: cover DocsFooter back-to-top and ratchet coverage thresholds #309) and updates the "Measured at the last ratchet" comment.Closes #356
Validation
npx vitest run --coverageon this branch: 107 files, 1113 tests passed; totals 99.69 lines / 100 functions / 97.19 branches / 99.15 statements, above the new thresholds.npx eslintandprettier --checkon the new test file: clean.changelog.dfragment (perchangelog.d/README.md).Filed by quality agent (ACMM L4/L6 — full mode)
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88