Skip to content

test(store): split diffStore's tests by concern - #22

Merged
mindaugaskasp merged 1 commit into
mainfrom
improvement/split-diffstore-tests
Aug 3, 2026
Merged

test(store): split diffStore's tests by concern#22
mindaugaskasp merged 1 commit into
mainfrom
improvement/split-diffstore-tests

Conversation

@mindaugaskasp

Copy link
Copy Markdown
Owner

One 2725-line file was the append point for every new store feature. Three merge conflicts in a row landed on its final lines — each one two branches appending, never disagreeing. The conflicts carried no information, and every resolution was a chance to drop a suite.

The split

Seven files by concern, plus the core:

file lines what it covers
diffStore.test.js 1252 loading, receiving and routing a comparison
diffStore.image.test.js 838 the screenshot pipeline and its failure paths
diffStore.disk.test.js 223 files moving under a live comparison
diffStore.streamed.test.js 148 comparisons too large to hold
diffStore.paste.test.js 103 paste mode and copied files
diffStore.export.test.js 96 patches, HTML, the config bundle
diffStore.snippets.test.js 81 snippets dropped into the pane
diffStore.diagram.test.js 67 the Diagram view's routing

Same 196 tests before and after, name for name.

Worth recording how that was verified, because the obvious check lies: git stash push -- tests does not stash untracked files, so a before/after count taken with the new files present reads 536 vs 446 and looks like 90 lost tests. Comparing the it( names directly, and the original file's count against the split total, both give 196 = 196.

npm run check green — 1974 passed. Tests only; no source change.

🤖 Generated with Claude Code

One 2725-line file was the append point for every new store feature, and three
merge conflicts in a row landed on its final lines — each one two branches
APPENDING, never disagreeing. The conflicts carried no information and every
resolution was a chance to drop a suite.

Seven files by concern: image export (the largest at 838 lines), disk changes,
streamed, paste, export/backup, diagram, snippets. The core file keeps loading,
receiving and routing a comparison.

Same 196 tests before and after, name for name. Worth stating how that was
checked, because the obvious check lies: `git stash push -- tests` does not
stash UNTRACKED files, so a before/after count with the new files present reads
536 vs 446 and looks like 90 lost tests. Comparing the `it(` names directly, and
the original file against the split total, both give 196 = 196.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@mindaugaskasp
mindaugaskasp merged commit 164a74e into main Aug 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant