Repository navigation
test(e2e): merge duplicate tests - #384
Merged
Merged
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
willgosnold
force-pushed
the
test/merge-duplicate-e2e
branch
from
October 27, 2026 18:39
c7b5639 to
c06efe1
Compare
This was referenced Oct 27, 2026
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.
Part of #382
Problem
Step 3 of #382 lists pairs of e2e tests that share setup and actions and differ only in what they assert. Each pair builds the same repo twice and runs the same commands twice.
Change
Three merges in
test/e2e.test.ts. Every assertion of both tests is kept. Three tests are removed.commit records a mode the index already hascommit takes a mode change to a file the fork added and records the mode the index already hasa commit that replaces staged changes in the copy says soa commit never records a tracked ignored file inside the vendored copy and says it replaced ita fork init refuses an upstream remote that serves a different tip than the given URLa stale mirrorrow ofa fork init says the remote serves different commits for ${how} and names the tip on each sidegit status.x.logpair had identical setup. The merged test asserts the exit code, the "replaced" line, the pinned files in head and a clean status.2750test is the stale-mirror scenario with the clone arranged the other way round. Its tip line moves into the loop. The table gains a third column,onRemote, so thefeaturerow expectsfeature is missing on the remote and <tip> on --upstream. No branch in the test body.Not merged:
record refuses a bad change name with no hand edits. It is not a duplicate of the label loop. The loop rows each make a hand edit first. This test has none, andrecord()checks the name before it checks for edits (src/record.ts:679and:692). It is the only test that fails if those two checks swap. Merging it into the loop would need either a branch in the body or the loss of that check.Not in this PR: the
14950/14884merge and the3266/3331item. The step 2 PR owns them, because it rewrites those lines (#382 (comment)).Verification
Typecheck passes (
bun run typecheck).Touched tests, from source and against the binary (
bun run build,PATCHBOOK_CMD="$PWD/dist/patchbook"): 4 pass, 0 fail in both.Each merged assertion fails when its expectation is broken, then the edit was reverted:
100644to100755.pbcopy executablefalsetotrueporcelain""to"x"status --shortcleanTest count and time for
test/e2e.test.ts,mainthen this branch, run back to back with--reporter=junit:time)bun testwallThe count drop of 3 is exact. The seconds are not a measurement of this change. Other agents were loading the machine, and three tests of under a second cannot account for 313s. Other test files are untouched.
Statement coverage, measured with the issue's harness on
mainand on this head (c06efe1): 5569 of 5761 statements both sides (96.67%), 0 lost. The diff lists exactly the 3 removed tests and the 4 renamed survivors.Written with Claude Sonnet 5.5 in Claude Code
🤖 Generated with Claude Code