« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/lib/content-function.js7
-rw-r--r--test/snapshot/image.js4
2 files changed, 9 insertions, 2 deletions
diff --git a/test/lib/content-function.js b/test/lib/content-function.js
index bb12be82..cd86e9bc 100644
--- a/test/lib/content-function.js
+++ b/test/lib/content-function.js
@@ -49,8 +49,15 @@ export function testContentFunctions(t, message, fn) {
             thumb,
             to,
             urls,
+
             appendIndexHTML: false,
+
             getColors: c => getColors(c, {chroma}),
+            getDimensionsOfImagePath: () => [600, 600],
+            getThumbnailEqualOrSmaller: () => 'medium',
+            getThumbnailsAvailableForDimensions: () =>
+              [['large', 800], ['medium', 400], ['small', 250]],
+
             ...extraDependencies,
           },
         });
diff --git a/test/snapshot/image.js b/test/snapshot/image.js
index 6bec1cca..5e12cc25 100644
--- a/test/snapshot/image.js
+++ b/test/snapshot/image.js
@@ -8,7 +8,7 @@ testContentFunctions(t, 'image (snapshot)', async (t, evaluate) => {
     evaluate.snapshot(message, {
       name: 'image',
       extraDependencies: {
-        getSizeOfImageFile: () => 0,
+        getSizeOfImagePath: () => 0,
       },
       ...opts,
     });
@@ -79,7 +79,7 @@ testContentFunctions(t, 'image (snapshot)', async (t, evaluate) => {
 
   quickSnapshot('link with file size', {
     extraDependencies: {
-      getSizeOfImageFile: () => 10 ** 6,
+      getSizeOfImagePath: () => 10 ** 6,
     },
     slots: {
       path: ['media.albumCover', 'pingas', 'png'],