« get me outta code hell

test: remove outdated tests for generateAlbumTrackListItem - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-06-12 17:10:17 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-06-12 17:10:17 -0300
commit5952f159e4d02c8f8356ab8a9860fca6330b7757 (patch)
treecc7162d447db826abfb194672c28945d855bd9b6
parent898969a17b90f9c11af78ad268bb3accbb090654 (diff)
test: remove outdated tests for generateAlbumTrackListItem
-rw-r--r--tap-snapshots/test/snapshot/generateAlbumTrackListItem.js.test.cjs21
-rw-r--r--test/snapshot/generateAlbumTrackListItem.js66
2 files changed, 0 insertions, 87 deletions
diff --git a/tap-snapshots/test/snapshot/generateAlbumTrackListItem.js.test.cjs b/tap-snapshots/test/snapshot/generateAlbumTrackListItem.js.test.cjs
deleted file mode 100644
index c561d34b..00000000
--- a/tap-snapshots/test/snapshot/generateAlbumTrackListItem.js.test.cjs
+++ /dev/null
@@ -1,21 +0,0 @@
-/* IMPORTANT
- * This snapshot file is auto-generated, but designed for humans.
- * It should be checked into source control and tracked carefully.
- * Re-generate by setting TAP_SNAPSHOT=1 and running tests.
- * Make sure to inspect the output below.  Do not ignore changes!
- */
-'use strict'
-exports[`test/snapshot/generateAlbumTrackListItem.js TAP generateAlbumTrackListItem (snapshot) > basic behavior 1`] = `
-<li style="--primary-color: #33cc77">(0:54) <a href="track/final-spice/" style="--primary-color: #33cc77; --dim-color: #437854">Final Spice</a> <span class="by">by <a href="artist/toby-fox/">Toby Fox</a> and <a href="artist/james-roach/">James Roach</a></span></li>
-`
-
-exports[`test/snapshot/generateAlbumTrackListItem.js TAP generateAlbumTrackListItem (snapshot) > hide artists if inherited from album 1`] = `
-<li>(_:__) <a href="track/track1/">Same artists, same order</a></li>
-<li>(_:__) <a href="track/track2/">Same artists, different order</a></li>
-<li>(_:__) <a href="track/track3/">Extra artist</a> <span class="by">by <a href="artist/toby-fox/">Toby Fox</a>, <a href="artist/james-roach/">James Roach</a>, and <a href="artist/clark-powell/">Clark Powell</a></span></li>
-<li>(_:__) <a href="track/track4/">Missing artist</a> <span class="by">by <a href="artist/toby-fox/">Toby Fox</a></span></li>
-`
-
-exports[`test/snapshot/generateAlbumTrackListItem.js TAP generateAlbumTrackListItem (snapshot) > zero duration, zero artists 1`] = `
-<li>(_:__) <a href="track/you-have-got-to-be-about-the-most-superficial-commentator-on-con-langues-since-the-idiotic-b-gilson/">You have got to be about the most superficial commentator on con-langues since the idiotic B. Gilson.</a></li>
-`
diff --git a/test/snapshot/generateAlbumTrackListItem.js b/test/snapshot/generateAlbumTrackListItem.js
deleted file mode 100644
index e87c6de0..00000000
--- a/test/snapshot/generateAlbumTrackListItem.js
+++ /dev/null
@@ -1,66 +0,0 @@
-import t from 'tap';
-import {testContentFunctions} from '../lib/content-function.js';
-
-testContentFunctions(t, 'generateAlbumTrackListItem (snapshot)', async (t, evaluate) => {
-  const artist1 = {directory: 'toby-fox', name: 'Toby Fox', urls: ['https://toby.fox/']};
-  const artist2 = {directory: 'james-roach', name: 'James Roach'};
-  const artist3 = {directory: 'clark-powell', name: 'Clark Powell'};
-  const artist4 = {directory: ''}
-  const albumContribs = [{who: artist1}, {who: artist2}];
-
-  await evaluate.load();
-
-  evaluate.snapshot('basic behavior', {
-    name: 'generateAlbumTrackListItem',
-    args: [
-      {
-        // Just pretend Hiveswap Act 1 OST doesn't have its own Artists field OK?
-        // We test that kind of case later!
-        name: 'Final Spice',
-        directory: 'final-spice',
-        duration: 54,
-        color: '#33cc77',
-        artistContribs: [
-          {who: artist1, what: 'composition & arrangement'},
-          {who: artist2, what: 'arrangement'},
-        ],
-      },
-      {artistContribs: []},
-    ],
-  });
-
-  evaluate.snapshot('zero duration, zero artists', {
-    name: 'generateAlbumTrackListItem',
-    args: [
-      {
-        name: 'You have got to be about the most superficial commentator on con-langues since the idiotic B. Gilson.',
-        directory: 'you-have-got-to-be-about-the-most-superficial-commentator-on-con-langues-since-the-idiotic-b-gilson',
-        duration: 0,
-        artistContribs: [],
-      },
-      {artistContribs: []},
-    ],
-  });
-
-  evaluate.snapshot('hide artists if inherited from album', {
-    name: 'generateAlbumTrackListItem',
-    multiple: [
-      {args: [
-        {directory: 'track1', name: 'Same artists, same order', artistContribs: [{who: artist1}, {who: artist2}]},
-        {artistContribs: albumContribs},
-      ]},
-      {args: [
-        {directory: 'track2', name: 'Same artists, different order', artistContribs: [{who: artist2}, {who: artist1}]},
-        {artistContribs: albumContribs},
-      ]},
-      {args: [
-        {directory: 'track3', name: 'Extra artist', artistContribs: [{who: artist1}, {who: artist2}, {who: artist3}]},
-        {artistContribs: albumContribs},
-      ]},
-      {args: [
-        {directory: 'track4', name: 'Missing artist', artistContribs: [{who: artist1}]},
-        {artistContribs: albumContribs},
-      ]},
-    ],
-  });
-});