test(react-harness): cover the six uncovered regions in the hook driver - #706
Open
hivecommons-hive[bot] wants to merge 1 commit into
Open
hivecommons-hive[bot] wants to merge 1 commit into
hivecommons-hive[bot] wants to merge 1 commit into
Conversation
tests/tools/react-hook-driver.mjs sits under every component suite, yet six of its sub-line regions were unexercised: the lazy useState initialiser, the functional updater, the Object.is bail-out, the undefined-deps arm of sameDeps, the unchanged-deps effect skip, and the repeat-unmount guard. A regression in any of them surfaces as an unexplained component failure, or as a suite that keeps passing while asserting nothing. This adds six tests to tests/react-harness.test.mjs, the file that already exists to pin harness branches no component suite reaches. Region coverage for tests/tools/react-hook-driver.mjs goes from 87.23% to 100%. Signed-off-by: hivecommons-hive[bot] <hivecommons-hive@hive.kubestellar.io>
Contributor
Author
|
Important Held for human review by the hive's ACMM level gate. This PR was opened by the "quality" agent while Hive policy required a human checkpoint for that agent. Non-outreach agents are held at ACMM L3–L5; the Hive will automatically remove the |
This was referenced Sep 27, 2026
This branch has not been deployed
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
tests/tools/react-hook-driver.mjsis the dispatcher every component suitereads its subject through, and six of its sub-line regions were unexercised.
This adds six tests to
tests/react-harness.test.mjs— the file that alreadyexists to pin harness branches no component suite happens to reach — one per
uncovered region:
useStateinitialiser is called once and its value is storedFiles touched:
tests/react-harness.test.mjsonly. No production code and noother test file changes, so this is disjoint from the open test PRs (#678,
#680, #686, #688, #693, #702), which claim
scripts/fixtures andtests/{import-architectures,svg-active-content,fetch-community-people,validate-*,collect-*,coverage-report-collect}.Region coverage for
tests/tools/react-hook-driver.mjs: 87.23% -> 100.00%(
TZ=UTC node tests/tools/coverage-report.mjs). Line coverage was already100%, so this is a pure region gain and no existing assertion changes.
Related Issue
Closes #705
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-opus-5 copilot=1.0.88