« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--tap-snapshots/test/snapshot/generateAlbumCoverArtwork.js.test.cjs37
-rw-r--r--tap-snapshots/test/snapshot/generateCoverArtwork.js.test.cjs70
-rw-r--r--tap-snapshots/test/snapshot/generateTrackCoverArtwork.js.test.cjs50
-rw-r--r--test/snapshot/generateAlbumCoverArtwork.js41
-rw-r--r--test/snapshot/generateCoverArtwork.js37
-rw-r--r--test/snapshot/generateTrackCoverArtwork.js70
6 files changed, 0 insertions, 305 deletions
diff --git a/tap-snapshots/test/snapshot/generateAlbumCoverArtwork.js.test.cjs b/tap-snapshots/test/snapshot/generateAlbumCoverArtwork.js.test.cjs
deleted file mode 100644
index 47df3e20..00000000
--- a/tap-snapshots/test/snapshot/generateAlbumCoverArtwork.js.test.cjs
+++ /dev/null
@@ -1,37 +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/generateAlbumCoverArtwork.js > TAP > generateAlbumCoverArtwork (snapshot) > display: primary 1`] = `
-[mocked: image
- args: [
-   [
-     { name: 'Damara', directory: 'damara', isContentWarning: false },
-     { name: 'Cronus', directory: 'cronus', isContentWarning: false },
-     { name: 'Bees', directory: 'bees', isContentWarning: false },
-     { name: 'creepy crawlies', isContentWarning: true }
-   ]
- ]
- slots: { path: [ 'media.albumCover', 'bee-forus-seatbelt-safebee', 'png' ], color: '#f28514', thumb: 'medium', reveal: true, link: true, dimensions: [ 400, 300 ] }]
-<ul class="image-details">
-    <li><a href="tag/damara/">Damara</a></li>
-    <li><a href="tag/cronus/">Cronus</a></li>
-    <li><a href="tag/bees/">Bees</a></li>
-</ul>
-`
-
-exports[`test/snapshot/generateAlbumCoverArtwork.js > TAP > generateAlbumCoverArtwork (snapshot) > display: thumbnail 1`] = `
-[mocked: image
- args: [
-   [
-     { name: 'Damara', directory: 'damara', isContentWarning: false },
-     { name: 'Cronus', directory: 'cronus', isContentWarning: false },
-     { name: 'Bees', directory: 'bees', isContentWarning: false },
-     { name: 'creepy crawlies', isContentWarning: true }
-   ]
- ]
- slots: { path: [ 'media.albumCover', 'bee-forus-seatbelt-safebee', 'png' ], color: '#f28514', thumb: 'small', reveal: false, link: false, dimensions: [ 400, 300 ] }]
-`
diff --git a/tap-snapshots/test/snapshot/generateCoverArtwork.js.test.cjs b/tap-snapshots/test/snapshot/generateCoverArtwork.js.test.cjs
deleted file mode 100644
index e080afaa..00000000
--- a/tap-snapshots/test/snapshot/generateCoverArtwork.js.test.cjs
+++ /dev/null
@@ -1,70 +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/generateCoverArtwork.js > TAP > generateCoverArtwork (snapshot) > mode: commentary 1`] = `
-[mocked: image
- args: [
-   [
-     { name: 'Damara', directory: 'damara', isContentWarning: false },
-     { name: 'Cronus', directory: 'cronus', isContentWarning: false },
-     { name: 'Bees', directory: 'bees', isContentWarning: false },
-     { name: 'creepy crawlies', isContentWarning: true }
-   ]
- ]
- slots: { path: [ 'media.albumCover', 'bee-forus-seatbelt-safebee', 'png' ], thumb: 'medium', reveal: true, link: true, lazy: true, square: true, attributes: { class: 'commentary-art' } }]
-`
-
-exports[`test/snapshot/generateCoverArtwork.js > TAP > generateCoverArtwork (snapshot) > mode: primary-artists 1`] = `
-[mocked: image
- args: [
-   [
-     { name: 'Damara', directory: 'damara', isContentWarning: false },
-     { name: 'Cronus', directory: 'cronus', isContentWarning: false },
-     { name: 'Bees', directory: 'bees', isContentWarning: false },
-     { name: 'creepy crawlies', isContentWarning: true }
-   ]
- ]
- slots: { path: [ 'media.albumCover', 'bee-forus-seatbelt-safebee', 'png' ], thumb: 'medium', reveal: true, link: true, square: true }]
-<p class="image-details illustrator-details">
-    Artwork by [mocked: linkArtistGallery
-     args: [ { name: 'Circlejourney', directory: 'circlejourney' } ]
-     slots: {}] and [mocked: linkArtistGallery
-     args: [ { name: 'magnoliajades', directory: 'magnoliajades' } ]
-     slots: {}]
-</p>
-`
-
-exports[`test/snapshot/generateCoverArtwork.js > TAP > generateCoverArtwork (snapshot) > mode: primary-tags 1`] = `
-[mocked: image
- args: [
-   [
-     { name: 'Damara', directory: 'damara', isContentWarning: false },
-     { name: 'Cronus', directory: 'cronus', isContentWarning: false },
-     { name: 'Bees', directory: 'bees', isContentWarning: false },
-     { name: 'creepy crawlies', isContentWarning: true }
-   ]
- ]
- slots: { path: [ 'media.albumCover', 'bee-forus-seatbelt-safebee', 'png' ], thumb: 'medium', reveal: true, link: true, square: true }]
-<ul class="image-details art-tag-details">
-    <li><a href="tag/damara/">Damara</a></li>
-    <li><a href="tag/cronus/">Cronus</a></li>
-    <li><a href="tag/bees/">Bees</a></li>
-</ul>
-`
-
-exports[`test/snapshot/generateCoverArtwork.js > TAP > generateCoverArtwork (snapshot) > mode: thumbnail 1`] = `
-[mocked: image
- args: [
-   [
-     { name: 'Damara', directory: 'damara', isContentWarning: false },
-     { name: 'Cronus', directory: 'cronus', isContentWarning: false },
-     { name: 'Bees', directory: 'bees', isContentWarning: false },
-     { name: 'creepy crawlies', isContentWarning: true }
-   ]
- ]
- slots: { path: [ 'media.albumCover', 'bee-forus-seatbelt-safebee', 'png' ], thumb: 'small', reveal: false, link: false, square: true }]
-`
diff --git a/tap-snapshots/test/snapshot/generateTrackCoverArtwork.js.test.cjs b/tap-snapshots/test/snapshot/generateTrackCoverArtwork.js.test.cjs
deleted file mode 100644
index c87d88c6..00000000
--- a/tap-snapshots/test/snapshot/generateTrackCoverArtwork.js.test.cjs
+++ /dev/null
@@ -1,50 +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/generateTrackCoverArtwork.js > TAP > generateTrackCoverArtwork (snapshot) > display: primary-tags - no unique art 1`] = `
-[mocked: image
- args: [
-   [
-     { name: 'Damara', directory: 'damara', isContentWarning: false },
-     { name: 'Cronus', directory: 'cronus', isContentWarning: false },
-     { name: 'Bees', directory: 'bees', isContentWarning: false },
-     { name: 'creepy crawlies', isContentWarning: true }
-   ]
- ]
- slots: { path: [ 'media.albumCover', 'bee-forus-seatbelt-safebee', 'png' ], alt: 'track cover', color: '#abcdef', thumb: 'medium', reveal: true, link: true, dimensions: [ 400, 300 ] }]
-<ul class="image-details art-tag-details">
-    <li><a href="tag/damara/">Damara</a></li>
-    <li><a href="tag/cronus/">Cronus</a></li>
-    <li><a href="tag/bees/">Bees</a></li>
-</ul>
-`
-
-exports[`test/snapshot/generateTrackCoverArtwork.js > TAP > generateTrackCoverArtwork (snapshot) > display: primary-tags - unique art 1`] = `
-[mocked: image
- args: [ [ { name: 'Bees', directory: 'bees', isContentWarning: false } ] ]
- slots: { path: [ 'media.trackCover', 'bee-forus-seatbelt-safebee', 'beesmp3', 'jpg' ], alt: 'track cover', color: '#f28514', thumb: 'medium', reveal: true, link: true, square: true }]
-<ul class="image-details art-tag-details"><li><a href="tag/bees/">Bees</a></li></ul>
-`
-
-exports[`test/snapshot/generateTrackCoverArtwork.js > TAP > generateTrackCoverArtwork (snapshot) > display: thumbnail - no unique art 1`] = `
-[mocked: image
- args: [
-   [
-     { name: 'Damara', directory: 'damara', isContentWarning: false },
-     { name: 'Cronus', directory: 'cronus', isContentWarning: false },
-     { name: 'Bees', directory: 'bees', isContentWarning: false },
-     { name: 'creepy crawlies', isContentWarning: true }
-   ]
- ]
- slots: { path: [ 'media.albumCover', 'bee-forus-seatbelt-safebee', 'png' ], alt: 'track cover', color: '#abcdef', thumb: 'small', reveal: false, link: false, dimensions: [ 400, 300 ] }]
-`
-
-exports[`test/snapshot/generateTrackCoverArtwork.js > TAP > generateTrackCoverArtwork (snapshot) > display: thumbnail - unique art 1`] = `
-[mocked: image
- args: [ [ { name: 'Bees', directory: 'bees', isContentWarning: false } ] ]
- slots: { path: [ 'media.trackCover', 'bee-forus-seatbelt-safebee', 'beesmp3', 'jpg' ], alt: 'track cover', color: '#f28514', thumb: 'small', reveal: false, link: false, square: true }]
-`
diff --git a/test/snapshot/generateAlbumCoverArtwork.js b/test/snapshot/generateAlbumCoverArtwork.js
deleted file mode 100644
index 52b4f9bb..00000000
--- a/test/snapshot/generateAlbumCoverArtwork.js
+++ /dev/null
@@ -1,41 +0,0 @@
-import t from 'tap';
-
-import contentFunction from '#content-function';
-import {testContentFunctions} from '#test-lib';
-
-testContentFunctions(t, 'generateAlbumCoverArtwork (snapshot)', async (t, evaluate) => {
-  await evaluate.load({
-    mock: {
-      image: evaluate.stubContentFunction('image'),
-    },
-  });
-
-  const album = {
-    directory: 'bee-forus-seatbelt-safebee',
-    coverArtFileExtension: 'png',
-    coverArtDimensions: [400, 300],
-    color: '#f28514',
-    artTags: [
-      {name: 'Damara', directory: 'damara', isContentWarning: false},
-      {name: 'Cronus', directory: 'cronus', isContentWarning: false},
-      {name: 'Bees', directory: 'bees', isContentWarning: false},
-      {name: 'creepy crawlies', isContentWarning: true},
-    ],
-    coverArtistContribs: [
-      {artist: {name: 'Circlejourney', directory: 'circlejourney'}},
-      {artist: {name: 'magnoliajades', directory: 'magnoliajades'}},
-    ],
-  };
-
-  evaluate.snapshot('display: primary-tags', {
-    name: 'generateAlbumCoverArtwork',
-    args: [album],
-    slots: {mode: 'primary-tags'},
-  });
-
-  evaluate.snapshot('display: thumbnail', {
-    name: 'generateAlbumCoverArtwork',
-    args: [album],
-    slots: {mode: 'thumbnail'},
-  });
-});
diff --git a/test/snapshot/generateCoverArtwork.js b/test/snapshot/generateCoverArtwork.js
deleted file mode 100644
index c2a89557..00000000
--- a/test/snapshot/generateCoverArtwork.js
+++ /dev/null
@@ -1,37 +0,0 @@
-import t from 'tap';
-import {testContentFunctions} from '#test-lib';
-
-testContentFunctions(t, 'generateCoverArtwork (snapshot)', async (t, evaluate) => {
-  await evaluate.load({
-    mock: {
-      image: evaluate.stubContentFunction('image', {mock: true}),
-      linkArtistGallery: evaluate.stubContentFunction('linkArtistGallery', {mock: true}),
-    },
-  });
-
-  const artTags = [
-    {name: 'Damara', directory: 'damara', isContentWarning: false},
-    {name: 'Cronus', directory: 'cronus', isContentWarning: false},
-    {name: 'Bees', directory: 'bees', isContentWarning: false},
-    {name: 'creepy crawlies', isContentWarning: true},
-  ];
-
-  const coverArtistContribs = [
-    {artist: {name: 'Circlejourney', directory: 'circlejourney'}},
-    {artist: {name: 'magnoliajades', directory: 'magnoliajades'}},
-  ];
-
-  const path = ['media.albumCover', 'bee-forus-seatbelt-safebee', 'png'];
-
-  const quickSnapshot = (mode) =>
-    evaluate.snapshot(`mode: ${mode}`, {
-      name: 'generateCoverArtwork',
-      args: [artTags, coverArtistContribs],
-      slots: {path, mode},
-    });
-
-  quickSnapshot('primary-tags');
-  quickSnapshot('primary-artists');
-  quickSnapshot('thumbnail');
-  quickSnapshot('commentary');
-});
diff --git a/test/snapshot/generateTrackCoverArtwork.js b/test/snapshot/generateTrackCoverArtwork.js
deleted file mode 100644
index 8f6ce772..00000000
--- a/test/snapshot/generateTrackCoverArtwork.js
+++ /dev/null
@@ -1,70 +0,0 @@
-import t from 'tap';
-import {testContentFunctions} from '#test-lib';
-
-testContentFunctions(t, 'generateTrackCoverArtwork (snapshot)', async (t, evaluate) => {
-  await evaluate.load({
-    mock: {
-      image: evaluate.stubContentFunction('image'),
-    },
-  });
-
-  const album = {
-    directory: 'bee-forus-seatbelt-safebee',
-    coverArtFileExtension: 'png',
-    coverArtDimensions: [400, 300],
-    artTags: [
-      {name: 'Damara', directory: 'damara', isContentWarning: false},
-      {name: 'Cronus', directory: 'cronus', isContentWarning: false},
-      {name: 'Bees', directory: 'bees', isContentWarning: false},
-      {name: 'creepy crawlies', isContentWarning: true},
-    ],
-    coverArtistContribs: [
-      {artist: {name: 'Circlejourney', directory: 'circlejourney'}},
-      {artist: {name: 'magnoliajades', directory: 'magnoliajades'}},
-    ],
-  };
-
-  const track1 = {
-    directory: 'beesmp3',
-    hasUniqueCoverArt: true,
-    coverArtFileExtension: 'jpg',
-    coverArtDimensions: null,
-    color: '#f28514',
-    artTags: [{name: 'Bees', directory: 'bees', isContentWarning: false}],
-    coverArtistContribs: [
-      {artist: {name: 'Circlejourney', directory: 'circlejourney'}},
-    ],
-    album,
-  };
-
-  const track2 = {
-    directory: 'fake-bonus-track',
-    hasUniqueCoverArt: false,
-    color: '#abcdef',
-    album,
-  };
-
-  evaluate.snapshot('display: primary-tags - unique art', {
-    name: 'generateTrackCoverArtwork',
-    args: [track1],
-    slots: {mode: 'primary-tags'},
-  });
-
-  evaluate.snapshot('display: thumbnail - unique art', {
-    name: 'generateTrackCoverArtwork',
-    args: [track1],
-    slots: {mode: 'thumbnail'},
-  });
-
-  evaluate.snapshot('display: primary-tags - no unique art', {
-    name: 'generateTrackCoverArtwork',
-    args: [track2],
-    slots: {mode: 'primary-tags'},
-  });
-
-  evaluate.snapshot('display: thumbnail - no unique art', {
-    name: 'generateTrackCoverArtwork',
-    args: [track2],
-    slots: {mode: 'thumbnail'},
-  });
-});