Repository navigation
test(input): drop unit tests that e2e tests now cover - #1528
Merged
Merged
Conversation
Six tests repeat an assertion an e2e test now makes on the real binary, and TestCopyModeEntryConfig only pinned the default copy_entry value. TestCloseSessionKeybindRaisesTheSameDialog and TestRenameTakesASpace came back in 1358f7c because nothing under e2e/tui covered them then. TestSidebarCloseOffersWorktreeDelete and TestOptionBackspaceDeletesAWordInTheRenameEditor cover them now.
Gaurav-Gosain
force-pushed
the
test/input-drop-covered-unit-tests
branch
from
November 4, 2026 10:35
d4ce59a to
3559788
Compare
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.
Why
I audited the unit tests against the rule in AGENTS.md: a unit test stays only when it catches a bug the e2e suite misses. In internal/input, six tests repeat an assertion that an e2e test now makes on the real binary, and one only pins a default value.
Scope
Removed, each with the e2e test that holds the same behaviour:
TestCopyPipeAndCancelLeavesCopyModeVkP, checks the piped output on the clipboard, and checks that copy mode ends.TestCopyPipeKeys(copy_pipe_test.go:207)TestCloseSessionKeybindRaisesTheSameDialogX, waits for the "Close session" dialog, cancels it, and checks the client is still up.TestSidebarCloseOffersWorktreeDelete(sidebar_close_worktree_test.go:74)TestHintsCloseOnWheelTestHintsDropAPasteAndCloseOnWheel(hints_test.go:609)TestBaseLayoutKeyRunsPrefixBindingTestBaseLayoutKeyOpensInbox(layout_keys_test.go:52)TestRenameTakesASpaceTestOptionBackspaceDeletesAWordInTheRenameEditor(word_delete_test.go:64)TestHoverKeepsScratchShownTestScratchStaysShownUnderHover(scratch_mouse_test.go:181)TestCopyModeEntryConfigcopy_entryis cursor.The comment on
TestRenameTakesNonASCIIcalled the removed space test its other half. It now names the e2e test instead.1358f7c restored
TestCloseSessionKeybindRaisesTheSameDialogandTestRenameTakesASpacebecause no e2e test covered them then. The two covering e2e tests landed later, on 2026-10-21 and 2026-10-28.I kept three tests that looked covered:
TestSwitcherEnterReachesThisMachineFromARemoteSession. The e2e test waits for "home" to be the current session. A switch sent to the far daemon by name could make a "home" session there and pass the same wait. That is the regression this unit test pins.TestNvimNavigatorFocusRequestMustFollowForwardedKey.TestNvimNavigationOSCNeedsForwardedKeyasserts both halves, but the rule stops a pane program from moving focus by itself. I read that as a trust boundary, which is a kept kind.TestCtrlDragStillMoves. It matchesTestCtrlDragArmsThenMovestoday, but only this test turns alt_drag on.Blast radius
Test files only. testselect reads each changed file as "a unit test file, not in the binary" and selects no e2e test. Each covering e2e test is in the test map, except
TestOptionBackspaceDeletesAWordInTheRenameEditor, which is newer than the map, so testselect runs it on every change that reaches the binary. None of the removed tests is named in e2e/tui/NEGATIVE_CONTROLS.md.Verification
go vet ./internal/input/andgo test -count=1 ./internal/input/pass.just check --changedpasses: fmt, vet, lint, tuioslint, vuln, gopls, tidy, cross and deadcode. Thefixreport lists three findings in copymode_visual.go and handler.go, which this change does not touch.testselect -base origin/mainruns no tests of 1438 for this diff.