test(comments): cover the list_controller.notifyProgrammaticScroll seam#1408
Open
sh1nj1 wants to merge 1 commit into
Open
test(comments): cover the list_controller.notifyProgrammaticScroll seam#1408sh1nj1 wants to merge 1 commit into
sh1nj1 wants to merge 1 commit into
Conversation
Codecov flagged uncovered patch lines in list_controller.js on #1407. The one genuinely uncovered new line was the public notifyProgrammaticScroll() seam (line 358): its only exercise, form_controller_review.test.js, mocks the list controller (mockReturnValue({ notifyProgrammaticScroll })), so the real delegating method never ran. Add a direct test that drives the real seam through the existing controller harness and asserts it drops the anchor, mirroring the permalink-jump test. Mutation-checked: neutering the seam fails only this test. Full JS suite 657/657, build clean.
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Follow-up to #1407 — closes a real codecov patch-coverage gap
Codecov flagged uncovered patch lines in
list_controller.json #1407. Investigating the diff against istanbul line data, the one genuinely uncovered new line was the publicnotifyProgrammaticScroll()seam (line 358).Root cause
The seam's only exercise is
form_controller_review.test.js, which mocks the list controller:That correctly unit-tests form_controller (it should not reach into the real navigator), but it means the real delegating seam on
list_controllernever ran under test — so it showed as uncovered.Fix
A direct test that drives the real seam through the existing controller harness (
buildController) and asserts it drops the anchor, mirroring the existing permalink-jump test.DA:358goes0 → 1(verified in lcov).npm run buildclean.Test-only change; no production code touched.