From 401236648e1efe907798dd4e2d368f1fbc773b62 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sat, 1 Jun 2024 00:03:22 -0300 Subject: test: update track section unit tests, don't be magically easy Most notably drops automatically setting ownTrackData. Hilariously, this doesn't break any tests (presumably because they were generally updated to handle a newer - albeit not the newest - track section format). --- test/lib/wiki-data.js | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'test/lib') diff --git a/test/lib/wiki-data.js b/test/lib/wiki-data.js index 75b1170a..c373aadd 100644 --- a/test/lib/wiki-data.js +++ b/test/lib/wiki-data.js @@ -12,23 +12,6 @@ export function linkAndBindWikiData(wikiData, { ? withEntries(wikiData, entries => entries .map(([key, value]) => [key, value.slice()])) : wikiData)); - - // If albumData is present, automatically set their sections' ownTrackData - // by resolving references against the full array. This is just a nicety - // for working with albums throughout tests. - if (inferAlbumsOwnTrackData && wikiData.albumData && wikiData.trackData) { - for (const album of wikiData.albumData) { - const trackSections = - CacheableObject.getUpdateValue(album, 'trackSections'); - - for (const trackSection of trackSections) { - trackSection.ownTrackData = - CacheableObject.getUpdateValue(trackSection, 'tracks') - .map(ref => - find.track(ref, wikiData.trackData, {mode: 'error'})); - } - } - } } customLinkWikiDataArrays(wikiData); -- cgit 1.3.0-6-gf8a5