From 8a588d11d9dd61e52c44ac2f0a5ce6781261e058 Mon Sep 17 00:00:00 2001 From: Raman Sinclair Date: Mon, 20 Jul 2026 15:56:43 +0200 Subject: [PATCH] test: make Discogs snapshots insensitive to JSON key order - 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. --- oxfmt.config.ts | 2 +- tests/discogs/README.md | 6 +- tests/discogs/discogs.test.ts | 38 ++++++- tests/discogs/fetch-fixtures.ts | 5 +- tests/discogs/fixtures/1156598.json | 147 +------------------------- tests/discogs/fixtures/1450895.json | 72 +------------ tests/discogs/fixtures/15313328.json | 28 ----- tests/discogs/fixtures/15771199.json | 32 ------ tests/discogs/fixtures/16345092.json | 42 +------- tests/discogs/fixtures/1996829.json | 60 ----------- tests/discogs/fixtures/3315779.json | 58 +--------- tests/discogs/fixtures/350350.json | 36 ------- tests/discogs/fixtures/5880212.json | 42 +------- tests/discogs/fixtures/8661943.json | 36 ------- tests/discogs/snapshots/1156598.json | 2 +- tests/discogs/snapshots/1450895.json | 2 +- tests/discogs/snapshots/15313328.json | 2 +- tests/discogs/snapshots/15771199.json | 2 +- tests/discogs/snapshots/16345092.json | 2 +- tests/discogs/snapshots/1996829.json | 2 +- tests/discogs/snapshots/3315779.json | 6 +- tests/discogs/snapshots/350350.json | 2 +- tests/discogs/snapshots/5880212.json | 6 +- tests/discogs/snapshots/8661943.json | 2 +- 24 files changed, 63 insertions(+), 569 deletions(-) diff --git a/oxfmt.config.ts b/oxfmt.config.ts index fbabd05e..2e2b9ace 100644 --- a/oxfmt.config.ts +++ b/oxfmt.config.ts @@ -12,7 +12,7 @@ export default defineConfig({ endOfLine: 'lf', insertFinalNewline: true, proseWrap: 'preserve', - ignorePatterns: ['pnpm-lock.yaml', 'tests/**/snapshots/**'], + ignorePatterns: ['pnpm-lock.yaml'], sortImports: true, overrides: [ { diff --git a/tests/discogs/README.md b/tests/discogs/README.md index 1d2e5ac7..8a2afbe3 100644 --- a/tests/discogs/README.md +++ b/tests/discogs/README.md @@ -20,7 +20,7 @@ A **fixture** is the JSON returned by the Discogs API for a release (e.g. `fixtu A **snapshot** is the JSON produced by running `parseDiscogsRelease` on that fixture (e.g. `snapshots/1996829.json`). It is the expected MusicBrainz import data: artist credits, labels, discs, tracks, durations, and so on. -Snapshot files are excluded from oxfmt formatting so their format is controlled exclusively by the test runner. +Snapshot files are regenerated by the tests with stable key ordering when `pnpm test:discogs -u` is used. When you change the parser, tests re-parse the fixtures and compare the result to the snapshots. @@ -29,7 +29,7 @@ When you change the parser, tests re-parse the fixtures and compare the result t 1. Read each entry listed in `config.ts`. 2. Load the matching fixture from `fixtures/.json`. 3. Run `parseDiscogsRelease` on it (via `load-parser.ts`, which loads the userscript in a Node VM with the required mocks). -4. Compare the output to `snapshots/.json` using `toMatchFileSnapshot`. +4. Parse `snapshots/.json` and compare it to the parser output with deep equality. Object key order is ignored, but array order and values still matter. CI runs `pnpm test:discogs` on every pull request. No Discogs API calls are made during normal test runs. @@ -67,7 +67,7 @@ Fetch fixtures from the Discogs API (needed after adding a release): pnpm test:discogs:update-fixtures ``` -Approve updated snapshots after an intentional parser change (no network request): +Regenerate snapshots after an intentional parser change (no network request): ```bash pnpm test:discogs -u diff --git a/tests/discogs/discogs.test.ts b/tests/discogs/discogs.test.ts index 4f76da76..30173cc4 100644 --- a/tests/discogs/discogs.test.ts +++ b/tests/discogs/discogs.test.ts @@ -13,13 +13,47 @@ const SNAPSHOTS_DIR = path.join(DIR, 'snapshots'); const parseDiscogsRelease = loadParseDiscogsRelease(); +function sortJsonValue(value: unknown): unknown { + if (Array.isArray(value)) { + return value.map(sortJsonValue); + } + + if (value !== null && typeof value === 'object') { + return Object.fromEntries( + Object.entries(value) + .sort(([left], [right]) => left.localeCompare(right)) + .map(([key, child]) => [key, sortJsonValue(child)]), + ); + } + + return value; +} + +function stableStringify(value: unknown): string { + return `${JSON.stringify(sortJsonValue(JSON.parse(JSON.stringify(value))), null, 4)}\n`; +} + +// These tests compare parsed JSON structurally, so mirror Vitest's snapshot update flags explicitly. +function shouldUpdateSnapshots(): boolean { + return process.argv.some(arg => arg === '-u' || arg === '--update' || arg === '--updateSnapshot'); +} + const releases = RELEASES.map(({ url, description }) => ({ id: path.basename(new URL(url).pathname), description, })); -test.each(releases)('$id: $description', async ({ id }) => { +test.each(releases)('$id: $description', ({ id }) => { const fixture = JSON.parse(fs.readFileSync(path.join(FIXTURES_DIR, `${id}.json`), 'utf8')) as Record; + const snapshotPath = path.join(SNAPSHOTS_DIR, `${id}.json`); const result = parseDiscogsRelease(fixture); - await expect(JSON.stringify(result, null, 4)).toMatchFileSnapshot(path.join(SNAPSHOTS_DIR, `${id}.json`)); + const serializedResult = stableStringify(result); + + if (shouldUpdateSnapshots() || !fs.existsSync(snapshotPath)) { + fs.writeFileSync(snapshotPath, serializedResult, 'utf8'); + return; + } + + const snapshot = JSON.parse(fs.readFileSync(snapshotPath, 'utf8')) as Record; + expect(JSON.parse(serializedResult)).toEqual(snapshot); }); diff --git a/tests/discogs/fetch-fixtures.ts b/tests/discogs/fetch-fixtures.ts index 24797ea3..3f33b0a1 100644 --- a/tests/discogs/fetch-fixtures.ts +++ b/tests/discogs/fetch-fixtures.ts @@ -8,7 +8,7 @@ const DIR = path.dirname(fileURLToPath(import.meta.url)); const FIXTURES_DIR = path.join(DIR, 'fixtures'); function stableStringify(value: unknown): string { - return JSON.stringify(value, null, 4); + return `${JSON.stringify(value, null, 4)}\n`; } function fixturePath(id: number): string { @@ -42,6 +42,9 @@ async function updateRelease(url: string): Promise { const fixture = await fetchFixture(url); const id = releaseIdFromFixture(fixture, url); + // Delete unused fields that change too often and are not needed by the script. + delete fixture['community']; + fs.mkdirSync(FIXTURES_DIR, { recursive: true }); fs.writeFileSync(fixturePath(id), stableStringify(fixture)); diff --git a/tests/discogs/fixtures/1156598.json b/tests/discogs/fixtures/1156598.json index 378908ef..7b22e730 100644 --- a/tests/discogs/fixtures/1156598.json +++ b/tests/discogs/fixtures/1156598.json @@ -110,147 +110,11 @@ } ], "data_quality": "Correct", - "community": { - "have": 3158, - "want": 1359, - "rating": { - "count": 389, - "average": 4.36 - }, - "submitter": { - "username": "kinoeyevert", - "resource_url": "https://api.discogs.com/users/kinoeyevert" - }, - "contributors": [ - { - "username": "kinoeyevert", - "resource_url": "https://api.discogs.com/users/kinoeyevert" - }, - { - "username": "kwulf", - "resource_url": "https://api.discogs.com/users/kwulf" - }, - { - "username": "marcelrecords", - "resource_url": "https://api.discogs.com/users/marcelrecords" - }, - { - "username": "blach", - "resource_url": "https://api.discogs.com/users/blach" - }, - { - "username": "mcdustsucker", - "resource_url": "https://api.discogs.com/users/mcdustsucker" - }, - { - "username": "jos_jaspers", - "resource_url": "https://api.discogs.com/users/jos_jaspers" - }, - { - "username": "Lovinda", - "resource_url": "https://api.discogs.com/users/Lovinda" - }, - { - "username": "3tone", - "resource_url": "https://api.discogs.com/users/3tone" - }, - { - "username": "Rossmichael", - "resource_url": "https://api.discogs.com/users/Rossmichael" - }, - { - "username": "nik", - "resource_url": "https://api.discogs.com/users/nik" - }, - { - "username": "MannerHeikki", - "resource_url": "https://api.discogs.com/users/MannerHeikki" - }, - { - "username": "kosats", - "resource_url": "https://api.discogs.com/users/kosats" - }, - { - "username": "home-of-the-record", - "resource_url": "https://api.discogs.com/users/home-of-the-record" - }, - { - "username": "Stathisan", - "resource_url": "https://api.discogs.com/users/Stathisan" - }, - { - "username": "pshico87", - "resource_url": "https://api.discogs.com/users/pshico87" - }, - { - "username": "karlglogauer", - "resource_url": "https://api.discogs.com/users/karlglogauer" - }, - { - "username": "yuhann", - "resource_url": "https://api.discogs.com/users/yuhann" - }, - { - "username": "solmaz.malek", - "resource_url": "https://api.discogs.com/users/solmaz.malek" - }, - { - "username": "allvinyl2", - "resource_url": "https://api.discogs.com/users/allvinyl2" - }, - { - "username": "Vinylfan4", - "resource_url": "https://api.discogs.com/users/Vinylfan4" - }, - { - "username": "DasBosun", - "resource_url": "https://api.discogs.com/users/DasBosun" - }, - { - "username": "mashanovmv", - "resource_url": "https://api.discogs.com/users/mashanovmv" - }, - { - "username": "bdierkes", - "resource_url": "https://api.discogs.com/users/bdierkes" - }, - { - "username": "Dreammare", - "resource_url": "https://api.discogs.com/users/Dreammare" - }, - { - "username": "romel55", - "resource_url": "https://api.discogs.com/users/romel55" - }, - { - "username": "dr._phibes_02", - "resource_url": "https://api.discogs.com/users/dr._phibes_02" - }, - { - "username": "floodzoog", - "resource_url": "https://api.discogs.com/users/floodzoog" - }, - { - "username": "anjo29", - "resource_url": "https://api.discogs.com/users/anjo29" - }, - { - "username": "ernstlx", - "resource_url": "https://api.discogs.com/users/ernstlx" - }, - { - "username": "templar53", - "resource_url": "https://api.discogs.com/users/templar53" - } - ], - "data_quality": "Correct", - "status": "Accepted" - }, "format_quantity": 1, "date_added": "2008-01-15T05:20:44-08:00", "date_changed": "2025-02-16T06:54:30-08:00", - "num_for_sale": 95, - "lowest_price": 2.42, + "num_for_sale": 98, + "lowest_price": 2.38, "master_id": 498, "master_url": "https://api.discogs.com/masters/498", "title": "Lizard", @@ -390,13 +254,6 @@ "description": "Full Album Playlist: \nhttps://www.youtube.com/playlist?list=PLXhfRoiJBIivF7WWLowP0hkPDypPtqInQ\n\nLIZARD\n(Fripp / Sinfield)\n\nPRINCE RUPERT AWAKES\n\nFarewell the temple master’s bells \nHis kiosk and his black worm seed \nCourtship solely of his word \nWith Eden", "duration": 0, "embed": true - }, - { - "uri": "https://www.youtube.com/watch?v=Zx4FOsyetMs", - "title": "King Crimson - Lizard (Album Visualiser)", - "description": "00:00:00 Cirkus (Including 'Entry Of The Cameleons')\n00:06:28 Indoor Games\n00:12:03 Happy Family\n00:16:26 Lady Of The Dancing Water\n00:19:14 Lizard ('Prince Rupert Awakes'/ 'Bolero'/ 'The Battle Of Glass Tears'/ 'Big Top')\n00:42:35 Studio Sessions: 'Cirku", - "duration": 0, - "embed": true } ], "genres": ["Rock"], diff --git a/tests/discogs/fixtures/1450895.json b/tests/discogs/fixtures/1450895.json index 50055df1..c167064c 100644 --- a/tests/discogs/fixtures/1450895.json +++ b/tests/discogs/fixtures/1450895.json @@ -233,79 +233,11 @@ } ], "data_quality": "Correct", - "community": { - "have": 323, - "want": 16, - "rating": { - "count": 16, - "average": 3.44 - }, - "submitter": { - "username": "aclbernie", - "resource_url": "https://api.discogs.com/users/aclbernie" - }, - "contributors": [ - { - "username": "aclbernie", - "resource_url": "https://api.discogs.com/users/aclbernie" - }, - { - "username": "love-vinyl-records", - "resource_url": "https://api.discogs.com/users/love-vinyl-records" - }, - { - "username": "Kergillian", - "resource_url": "https://api.discogs.com/users/Kergillian" - }, - { - "username": "MaximusMCX", - "resource_url": "https://api.discogs.com/users/MaximusMCX" - }, - { - "username": "harbour", - "resource_url": "https://api.discogs.com/users/harbour" - }, - { - "username": "Bladerunner1858", - "resource_url": "https://api.discogs.com/users/Bladerunner1858" - }, - { - "username": "gone4sure", - "resource_url": "https://api.discogs.com/users/gone4sure" - }, - { - "username": "themusicgoesaround", - "resource_url": "https://api.discogs.com/users/themusicgoesaround" - }, - { - "username": "vokuhila", - "resource_url": "https://api.discogs.com/users/vokuhila" - }, - { - "username": "johntugby", - "resource_url": "https://api.discogs.com/users/johntugby" - }, - { - "username": "uzumaki", - "resource_url": "https://api.discogs.com/users/uzumaki" - }, - { - "username": "capitolfive", - "resource_url": "https://api.discogs.com/users/capitolfive" - }, - { - "username": "andygrayrecords", - "resource_url": "https://api.discogs.com/users/andygrayrecords" - } - ], - "data_quality": "Correct", - "status": "Accepted" - }, "format_quantity": 2, "date_added": "2008-09-07T01:35:40-07:00", "date_changed": "2020-01-12T09:14:01-08:00", - "num_for_sale": 70, - "lowest_price": 0.17, + "num_for_sale": 72, + "lowest_price": 0.18, "master_id": 77692, "master_url": "https://api.discogs.com/masters/77692", "title": "Live", diff --git a/tests/discogs/fixtures/15313328.json b/tests/discogs/fixtures/15313328.json index 19ed3c1c..4bb6e2fc 100644 --- a/tests/discogs/fixtures/15313328.json +++ b/tests/discogs/fixtures/15313328.json @@ -87,34 +87,6 @@ } ], "data_quality": "Needs Vote", - "community": { - "have": 17, - "want": 1, - "rating": { - "count": 1, - "average": 4 - }, - "submitter": { - "username": "steverogers", - "resource_url": "https://api.discogs.com/users/steverogers" - }, - "contributors": [ - { - "username": "steverogers", - "resource_url": "https://api.discogs.com/users/steverogers" - }, - { - "username": "demier777", - "resource_url": "https://api.discogs.com/users/demier777" - }, - { - "username": "M3acull", - "resource_url": "https://api.discogs.com/users/M3acull" - } - ], - "data_quality": "Needs Vote", - "status": "Accepted" - }, "format_quantity": 41, "date_added": "2020-05-15T15:52:30-07:00", "date_changed": "2024-01-17T00:55:56-08:00", diff --git a/tests/discogs/fixtures/15771199.json b/tests/discogs/fixtures/15771199.json index 09d64f3e..2aa514cd 100644 --- a/tests/discogs/fixtures/15771199.json +++ b/tests/discogs/fixtures/15771199.json @@ -89,38 +89,6 @@ } ], "data_quality": "Needs Vote", - "community": { - "have": 145, - "want": 29, - "rating": { - "count": 6, - "average": 4.17 - }, - "submitter": { - "username": "IvanDobsky", - "resource_url": "https://api.discogs.com/users/IvanDobsky" - }, - "contributors": [ - { - "username": "IvanDobsky", - "resource_url": "https://api.discogs.com/users/IvanDobsky" - }, - { - "username": "Disgone", - "resource_url": "https://api.discogs.com/users/Disgone" - }, - { - "username": "Broedi", - "resource_url": "https://api.discogs.com/users/Broedi" - }, - { - "username": "paquet", - "resource_url": "https://api.discogs.com/users/paquet" - } - ], - "data_quality": "Needs Vote", - "status": "Accepted" - }, "format_quantity": 3, "date_added": "2020-08-15T06:18:06-07:00", "date_changed": "2020-09-27T14:18:48-07:00", diff --git a/tests/discogs/fixtures/16345092.json b/tests/discogs/fixtures/16345092.json index 80093f2b..de11afb0 100644 --- a/tests/discogs/fixtures/16345092.json +++ b/tests/discogs/fixtures/16345092.json @@ -93,50 +93,10 @@ } ], "data_quality": "Correct", - "community": { - "have": 243, - "want": 21, - "rating": { - "count": 16, - "average": 4.44 - }, - "submitter": { - "username": "DaveTheVan", - "resource_url": "https://api.discogs.com/users/DaveTheVan" - }, - "contributors": [ - { - "username": "DaveTheVan", - "resource_url": "https://api.discogs.com/users/DaveTheVan" - }, - { - "username": "_Hawkhead_", - "resource_url": "https://api.discogs.com/users/_Hawkhead_" - }, - { - "username": "TBlikeng", - "resource_url": "https://api.discogs.com/users/TBlikeng" - }, - { - "username": "IvanDobsky", - "resource_url": "https://api.discogs.com/users/IvanDobsky" - }, - { - "username": "Nooway", - "resource_url": "https://api.discogs.com/users/Nooway" - }, - { - "username": "zombiekev", - "resource_url": "https://api.discogs.com/users/zombiekev" - } - ], - "data_quality": "Correct", - "status": "Accepted" - }, "format_quantity": 2, "date_added": "2020-12-05T08:39:54-08:00", "date_changed": "2021-10-14T07:20:54-07:00", - "num_for_sale": 23, + "num_for_sale": 22, "lowest_price": 13.2, "master_id": 1862472, "master_url": "https://api.discogs.com/masters/1862472", diff --git a/tests/discogs/fixtures/1996829.json b/tests/discogs/fixtures/1996829.json index ce814274..640e7abd 100644 --- a/tests/discogs/fixtures/1996829.json +++ b/tests/discogs/fixtures/1996829.json @@ -74,66 +74,6 @@ } ], "data_quality": "Needs Vote", - "community": { - "have": 51, - "want": 6, - "rating": { - "count": 3, - "average": 3.33 - }, - "submitter": { - "username": "Markus", - "resource_url": "https://api.discogs.com/users/Markus" - }, - "contributors": [ - { - "username": "Markus", - "resource_url": "https://api.discogs.com/users/Markus" - }, - { - "username": "MidMusic", - "resource_url": "https://api.discogs.com/users/MidMusic" - }, - { - "username": "ThisGuyFrritz", - "resource_url": "https://api.discogs.com/users/ThisGuyFrritz" - }, - { - "username": "Internaut", - "resource_url": "https://api.discogs.com/users/Internaut" - }, - { - "username": "DiscogsUpdateBot", - "resource_url": "https://api.discogs.com/users/DiscogsUpdateBot" - }, - { - "username": "vivaldi55", - "resource_url": "https://api.discogs.com/users/vivaldi55" - }, - { - "username": "stramineushomo", - "resource_url": "https://api.discogs.com/users/stramineushomo" - }, - { - "username": "oceanographer", - "resource_url": "https://api.discogs.com/users/oceanographer" - }, - { - "username": "ericvisser", - "resource_url": "https://api.discogs.com/users/ericvisser" - }, - { - "username": "officialandbootz", - "resource_url": "https://api.discogs.com/users/officialandbootz" - }, - { - "username": "gemini80s", - "resource_url": "https://api.discogs.com/users/gemini80s" - } - ], - "data_quality": "Needs Vote", - "status": "Accepted" - }, "format_quantity": 1, "date_added": "2009-11-06T16:38:33-08:00", "date_changed": "2022-12-01T03:50:46-08:00", diff --git a/tests/discogs/fixtures/3315779.json b/tests/discogs/fixtures/3315779.json index b0804dd6..1fb6a923 100644 --- a/tests/discogs/fixtures/3315779.json +++ b/tests/discogs/fixtures/3315779.json @@ -64,66 +64,10 @@ } ], "data_quality": "Needs Vote", - "community": { - "have": 278, - "want": 51, - "rating": { - "count": 5, - "average": 3 - }, - "submitter": { - "username": "SillyKees", - "resource_url": "https://api.discogs.com/users/SillyKees" - }, - "contributors": [ - { - "username": "SillyKees", - "resource_url": "https://api.discogs.com/users/SillyKees" - }, - { - "username": "Mepeye", - "resource_url": "https://api.discogs.com/users/Mepeye" - }, - { - "username": "Indie_snake", - "resource_url": "https://api.discogs.com/users/Indie_snake" - }, - { - "username": "Oldies-Forever", - "resource_url": "https://api.discogs.com/users/Oldies-Forever" - }, - { - "username": "DiscogsUpdateBot", - "resource_url": "https://api.discogs.com/users/DiscogsUpdateBot" - }, - { - "username": "MannerHeikki", - "resource_url": "https://api.discogs.com/users/MannerHeikki" - }, - { - "username": "Stonehedges", - "resource_url": "https://api.discogs.com/users/Stonehedges" - }, - { - "username": "alain-a", - "resource_url": "https://api.discogs.com/users/alain-a" - }, - { - "username": "vinylzoekertje", - "resource_url": "https://api.discogs.com/users/vinylzoekertje" - }, - { - "username": "MaximusMCX", - "resource_url": "https://api.discogs.com/users/MaximusMCX" - } - ], - "data_quality": "Needs Vote", - "status": "Accepted" - }, "format_quantity": 1, "date_added": "2012-01-01T08:54:59-08:00", "date_changed": "2022-08-09T12:20:16-07:00", - "num_for_sale": 10, + "num_for_sale": 9, "lowest_price": 1.32, "master_id": 1693520, "master_url": "https://api.discogs.com/masters/1693520", diff --git a/tests/discogs/fixtures/350350.json b/tests/discogs/fixtures/350350.json index bbc11e56..785a5b62 100644 --- a/tests/discogs/fixtures/350350.json +++ b/tests/discogs/fixtures/350350.json @@ -58,42 +58,6 @@ } ], "data_quality": "Correct", - "community": { - "have": 102, - "want": 59, - "rating": { - "count": 22, - "average": 4.36 - }, - "submitter": { - "username": "krrratz", - "resource_url": "https://api.discogs.com/users/krrratz" - }, - "contributors": [ - { - "username": "krrratz", - "resource_url": "https://api.discogs.com/users/krrratz" - }, - { - "username": "bzzp", - "resource_url": "https://api.discogs.com/users/bzzp" - }, - { - "username": "stassen", - "resource_url": "https://api.discogs.com/users/stassen" - }, - { - "username": "DiscogsUpdateBot", - "resource_url": "https://api.discogs.com/users/DiscogsUpdateBot" - }, - { - "username": "betadron", - "resource_url": "https://api.discogs.com/users/betadron" - } - ], - "data_quality": "Correct", - "status": "Accepted" - }, "format_quantity": 1, "date_added": "2005-01-08T21:20:57-08:00", "date_changed": "2015-05-04T08:40:44-07:00", diff --git a/tests/discogs/fixtures/5880212.json b/tests/discogs/fixtures/5880212.json index fa6646e2..72c7c50e 100644 --- a/tests/discogs/fixtures/5880212.json +++ b/tests/discogs/fixtures/5880212.json @@ -124,50 +124,10 @@ } ], "data_quality": "Needs Vote", - "community": { - "have": 41, - "want": 7, - "rating": { - "count": 2, - "average": 5 - }, - "submitter": { - "username": "Frysian", - "resource_url": "https://api.discogs.com/users/Frysian" - }, - "contributors": [ - { - "username": "Frysian", - "resource_url": "https://api.discogs.com/users/Frysian" - }, - { - "username": "Rossmichael", - "resource_url": "https://api.discogs.com/users/Rossmichael" - }, - { - "username": "DiscogsUpdateBot", - "resource_url": "https://api.discogs.com/users/DiscogsUpdateBot" - }, - { - "username": "Zanyramorsky", - "resource_url": "https://api.discogs.com/users/Zanyramorsky" - }, - { - "username": "officialandbootz", - "resource_url": "https://api.discogs.com/users/officialandbootz" - }, - { - "username": "Stathisan", - "resource_url": "https://api.discogs.com/users/Stathisan" - } - ], - "data_quality": "Needs Vote", - "status": "Accepted" - }, "format_quantity": 2, "date_added": "2014-07-13T07:03:36-07:00", "date_changed": "2025-07-30T08:48:25-07:00", - "num_for_sale": 6, + "num_for_sale": 7, "lowest_price": 3.95, "title": "The Complete Harpsichord Concertos", "country": "UK & Europe", diff --git a/tests/discogs/fixtures/8661943.json b/tests/discogs/fixtures/8661943.json index 8e40aa68..47853593 100644 --- a/tests/discogs/fixtures/8661943.json +++ b/tests/discogs/fixtures/8661943.json @@ -39,42 +39,6 @@ } ], "data_quality": "Needs Vote", - "community": { - "have": 6, - "want": 10, - "rating": { - "count": 2, - "average": 4 - }, - "submitter": { - "username": "majorChernitsa", - "resource_url": "https://api.discogs.com/users/majorChernitsa" - }, - "contributors": [ - { - "username": "majorChernitsa", - "resource_url": "https://api.discogs.com/users/majorChernitsa" - }, - { - "username": "brand0", - "resource_url": "https://api.discogs.com/users/brand0" - }, - { - "username": "Qdisc", - "resource_url": "https://api.discogs.com/users/Qdisc" - }, - { - "username": "mirrinda", - "resource_url": "https://api.discogs.com/users/mirrinda" - }, - { - "username": "Same.Old.Me", - "resource_url": "https://api.discogs.com/users/Same.Old.Me" - } - ], - "data_quality": "Needs Vote", - "status": "Accepted" - }, "format_quantity": 2, "date_added": "2016-06-16T19:56:48-07:00", "date_changed": "2020-03-09T04:25:27-07:00", diff --git a/tests/discogs/snapshots/1156598.json b/tests/discogs/snapshots/1156598.json index 969e27ee..0e6c9369 100644 --- a/tests/discogs/snapshots/1156598.json +++ b/tests/discogs/snapshots/1156598.json @@ -71,4 +71,4 @@ ], "secondary_types": [], "type": "album" -} \ No newline at end of file +} diff --git a/tests/discogs/snapshots/1450895.json b/tests/discogs/snapshots/1450895.json index e046c711..5ccd6e16 100644 --- a/tests/discogs/snapshots/1450895.json +++ b/tests/discogs/snapshots/1450895.json @@ -233,4 +233,4 @@ ], "secondary_types": [], "type": "album" -} \ No newline at end of file +} diff --git a/tests/discogs/snapshots/15313328.json b/tests/discogs/snapshots/15313328.json index 4018e76e..62d57db9 100644 --- a/tests/discogs/snapshots/15313328.json +++ b/tests/discogs/snapshots/15313328.json @@ -126,4 +126,4 @@ } ], "secondary_types": [] -} \ No newline at end of file +} diff --git a/tests/discogs/snapshots/15771199.json b/tests/discogs/snapshots/15771199.json index 718cde57..56138e60 100644 --- a/tests/discogs/snapshots/15771199.json +++ b/tests/discogs/snapshots/15771199.json @@ -232,4 +232,4 @@ "secondary_types": [], "type": "album", "barcode": "5053760056973" -} \ No newline at end of file +} diff --git a/tests/discogs/snapshots/16345092.json b/tests/discogs/snapshots/16345092.json index ce34d863..2af5ec8b 100644 --- a/tests/discogs/snapshots/16345092.json +++ b/tests/discogs/snapshots/16345092.json @@ -132,4 +132,4 @@ "secondary_types": [], "type": "album", "barcode": "5013929183087" -} \ No newline at end of file +} diff --git a/tests/discogs/snapshots/1996829.json b/tests/discogs/snapshots/1996829.json index 119bb5d9..41444f10 100644 --- a/tests/discogs/snapshots/1996829.json +++ b/tests/discogs/snapshots/1996829.json @@ -110,4 +110,4 @@ "secondary_types": [], "type": "album", "barcode": "089408033223" -} \ No newline at end of file +} diff --git a/tests/discogs/snapshots/3315779.json b/tests/discogs/snapshots/3315779.json index 7147bf01..633bc0e5 100644 --- a/tests/discogs/snapshots/3315779.json +++ b/tests/discogs/snapshots/3315779.json @@ -263,7 +263,5 @@ "link_type": 76 } ], - "secondary_types": [ - "compilation" - ] -} \ No newline at end of file + "secondary_types": ["compilation"] +} diff --git a/tests/discogs/snapshots/350350.json b/tests/discogs/snapshots/350350.json index be484812..5c761c28 100644 --- a/tests/discogs/snapshots/350350.json +++ b/tests/discogs/snapshots/350350.json @@ -46,4 +46,4 @@ ], "secondary_types": [], "barcode": "4015698053821" -} \ No newline at end of file +} diff --git a/tests/discogs/snapshots/5880212.json b/tests/discogs/snapshots/5880212.json index 5dddce9b..1012f615 100644 --- a/tests/discogs/snapshots/5880212.json +++ b/tests/discogs/snapshots/5880212.json @@ -93,8 +93,6 @@ "link_type": 76 } ], - "secondary_types": [ - "compilation" - ], + "secondary_types": ["compilation"], "barcode": "028946003121" -} \ No newline at end of file +} diff --git a/tests/discogs/snapshots/8661943.json b/tests/discogs/snapshots/8661943.json index 7189e1d9..efb0837c 100644 --- a/tests/discogs/snapshots/8661943.json +++ b/tests/discogs/snapshots/8661943.json @@ -150,4 +150,4 @@ "secondary_types": [], "type": "album", "packaging": "gatefold cover" -} \ No newline at end of file +}