« get me outta code hell

test: generateAdditionalFilesShortcut (snapshot) - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/test/snapshot
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-04-05 16:06:52 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-04-05 16:06:52 -0300
commitcea250920bdbe12e1d87469ee9070211610884a4 (patch)
tree0d60d7b272ce8f5d65707224730b00456e31f0c8 /test/snapshot
parent17f1220718f0e736723108042fc00cd5cb90070d (diff)
test: generateAdditionalFilesShortcut (snapshot)
Diffstat (limited to 'test/snapshot')
-rw-r--r--test/snapshot/generateAdditionalFilesShortcut.js36
1 files changed, 36 insertions, 0 deletions
diff --git a/test/snapshot/generateAdditionalFilesShortcut.js b/test/snapshot/generateAdditionalFilesShortcut.js
new file mode 100644
index 00000000..0ca777b4
--- /dev/null
+++ b/test/snapshot/generateAdditionalFilesShortcut.js
@@ -0,0 +1,36 @@
+import t from 'tap';
+import {testContentFunctions} from '../lib/content-function.js';
+
+testContentFunctions(t, 'generateAdditionalFilesShortcut (snapshot)', async (t, evaluate) => {
+  await evaluate.load();
+
+  evaluate.snapshot('no additional files', {
+    name: 'generateAdditionalFilesShortcut',
+    args: [[]],
+  });
+
+  evaluate.snapshot('basic behavior', {
+    name: 'generateAdditionalFilesShortcut',
+    args: [
+      [
+        {
+          title: 'SBURB Wallpaper',
+          files: [
+            'sburbwp_1280x1024.jpg',
+            'sburbwp_1440x900.jpg',
+            'sburbwp_1920x1080.jpg',
+          ],
+        },
+        {
+          title: 'Alternate Covers',
+          description: 'This is just an example description.',
+          files: [
+            'Homestuck_Vol4_alt1.jpg',
+            'Homestuck_Vol4_alt2.jpg',
+            'Homestuck_Vol4_alt3.jpg',
+          ],
+        },
+      ],
+    ],
+  });
+});