test(store): split diffStore's tests by concern - #22
Merged
Conversation
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>
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.
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:
diffStore.test.jsdiffStore.image.test.jsdiffStore.disk.test.jsdiffStore.streamed.test.jsdiffStore.paste.test.jsdiffStore.export.test.jsdiffStore.snippets.test.jsdiffStore.diagram.test.jsSame 196 tests before and after, name for name.
Worth recording how that was verified, because the obvious check lies:
git stash push -- testsdoes 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 theit(names directly, and the original file's count against the split total, both give 196 = 196.npm run checkgreen — 1974 passed. Tests only; no source change.🤖 Generated with Claude Code