« get me outta code hell

Merge branch 'staging' into track-data-cleanup - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/test
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-09-24 10:02:01 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-09-24 10:02:01 -0300
commit9f632c68f6a587a8621e509913c26d7c04794624 (patch)
tree2879ed7782a75e8d540ca72058b3018aeac08660 /test
parent942b05a2beed7d28e93ae256de0f58be5b7e385a (diff)
parentd31c0fd9fce845276ab131f2f0d40616e1f56b40 (diff)
Merge branch 'staging' into track-data-cleanup
Diffstat (limited to 'test')
-rw-r--r--test/snapshot/image.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/snapshot/image.js b/test/snapshot/image.js
index 8608ab69..2a1e9805 100644
--- a/test/snapshot/image.js
+++ b/test/snapshot/image.js
@@ -14,6 +14,7 @@ testContentFunctions(t, 'image (snapshot)', async (t, evaluate) => {
         getThumbnailEqualOrSmaller: () => 'medium',
         getThumbnailsAvailableForDimensions: () =>
           [['large', 800], ['medium', 400], ['small', 250]],
+        missingImagePaths: ['album-art/missing/cover.png'],
         ...extraDependencies,
       },
       ...opts,
@@ -114,6 +115,7 @@ testContentFunctions(t, 'image (snapshot)', async (t, evaluate) => {
       getThumbnailsAvailableForDimensions: () =>
         [['voluminous', 1200], ['middling', 900], ['petite', 20]],
       getThumbnailEqualOrSmaller: () => 'voluminous',
+      missingImagePaths: [],
     },
     slots: {
       thumb: 'gargantuan',
@@ -127,4 +129,20 @@ testContentFunctions(t, 'image (snapshot)', async (t, evaluate) => {
       path: ['media.flashArt', '5426', 'gif'],
     },
   });
+
+  quickSnapshot('missing image path', {
+    slots: {
+      thumb: 'medium',
+      path: ['media.albumCover', 'missing', 'png'],
+      link: true,
+    },
+  });
+
+  quickSnapshot('missing image path w/ missingSourceContent', {
+    slots: {
+      thumb: 'medium',
+      path: ['media.albumCover', 'missing', 'png'],
+      missingSourceContent: `Cover's missing, whoops`,
+    },
+  });
 });