Skip to content

test: add separate snapshot update command and rely on object comparison rather than strings - #1007

Merged
arsinclair merged 1 commit into
masterfrom
test/abandong-string-matching
Jul 20, 2026
Merged

test: add separate snapshot update command and rely on object comparison rather than strings#1007
arsinclair merged 1 commit into
masterfrom
test/abandong-string-matching

Conversation

@arsinclair

@arsinclair arsinclair commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

In the previous commit I tried to stabilise the produced snapshots so that they match the output from the discogs function, however it led to some hidden problems with oxfmt. The only reason I tried to do it is to keep the pnpm test:discogs -u command so that vitest handles snapshot files, however fixing the hidden issue mentioned above together with already a complicated setup I think we shouldn't rely on snapshot comparison as strings at all. It's much easier to compare them as objects and just create a separate command to regenerate snapshots, and this is what the current PR is doing.

…son rather than strings

In the previous commit I tried to stabilise the produced snapshots so that they match the output from the discogs function, however it lead to some hidden problems. The only reason I tried to do it is to keep the `pnpm test:discogs -u` command so that vitest handles snapshot files, however fixing the hidden issue mentioned above together with already a complicated setup I think we shouldn't rely on snapshot comparison as strings at all. It's much easier to compare them as objects and just create a separate command to regenerate snapshots, and this is what the current PR is doing.
@arsinclair arsinclair self-assigned this Jul 20, 2026
@arsinclair
arsinclair merged commit 42b738f into master Jul 20, 2026
1 check passed
@arsinclair
arsinclair deleted the test/abandong-string-matching branch July 20, 2026 14:36
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