Round-trip tests: non-default crop survives .mock.json and share links (source-media issue 02) - #13
Merged
Conversation
…s (source-media issue 02) Addendum to #12: these two tests were accidentally absorbed into the issue-01 prefactor commit while both tickets shared a working tree, so they landed in neither merged PR. Test-only.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Summary
.mock.json(toJson/fromJson) and share links (encodeShareParam/decodeShareParam) with full fidelity.Test plan
pnpm vitest run src/core/serialize.test.ts— 17 passedNote
Low Risk
Only new tests in
serialize.test.ts; no runtime or serialization logic changes.Overview
Test-only restoration of coverage that was meant to land with related work but was dropped when two tickets shared a working tree.
Adds two Vitest cases in
serialize.test.ts: one asserts a document with a non-defaultimage.crop(zoom/panX/panY) survivestoJson→fromJsonwithrecovered: falseand full document equality; the other asserts the same crop values surviveencodeShareParam→decodeShareParamfor share links.Reviewed by Cursor Bugbot for commit 923ff2d. Bugbot is set up for automated code reviews on this repo. Configure here.