Skip to content

test: make Discogs snapshots insensitive to JSON key order - #1006

Merged
arsinclair merged 1 commit into
masterfrom
test/order-independent-comparison
Jul 20, 2026
Merged

test: make Discogs snapshots insensitive to JSON key order#1006
arsinclair merged 1 commit into
masterfrom
test/order-independent-comparison

Conversation

@arsinclair

@arsinclair arsinclair commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator
  • compare Discogs parser snapshots as parsed JSON instead of serialized strings, so object key ordering changes no longer cause false test failures. Snapshot regeneration via pnpm test:discogs -u now writes stable sorted-key JSON.
  • also omit the volatile Discogs community field from fetched fixtures and remove it from the existing fixture set, since the importer does not use it and its counts change frequently.

@arsinclair arsinclair self-assigned this Jul 20, 2026
- compare Discogs parser snapshots as parsed JSON instead of serialized strings, so object key ordering changes no longer cause false test failures. Snapshot regeneration via `pnpm test:discogs -u` is preserved and writes stable sorted-key JSON.
- also omit the volatile Discogs `community` field from fetched fixtures and remove it from the existing fixture set, since the importer does not use it and its counts change frequently.
@arsinclair
arsinclair force-pushed the test/order-independent-comparison branch from b5878f5 to 8a588d1 Compare July 20, 2026 14:03
@arsinclair
arsinclair merged commit 4b9e3a5 into master Jul 20, 2026
1 check passed
@arsinclair
arsinclair deleted the test/order-independent-comparison branch July 20, 2026 14:04
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