« get me outta code hell

content: generatePageBanner -> generateBanner - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/test/snapshot/generateBanner.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-06-15 16:58:33 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-06-15 16:58:33 -0300
commite8be35c86308eaf66fb40da311d3e1ed54662a0a (patch)
treef83a13f17e8f541cbbf0ea71f96cf4ac05d4c687 /test/snapshot/generateBanner.js
parent6389af975c93f2c35ba21636cc697251fea580d6 (diff)
content: generatePageBanner -> generateBanner
Diffstat (limited to 'test/snapshot/generateBanner.js')
-rw-r--r--test/snapshot/generateBanner.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/snapshot/generateBanner.js b/test/snapshot/generateBanner.js
new file mode 100644
index 00000000..587ce04a
--- /dev/null
+++ b/test/snapshot/generateBanner.js
@@ -0,0 +1,22 @@
+import t from 'tap';
+import {testContentFunctions} from '../lib/content-function.js';
+
+testContentFunctions(t, 'generateBanner (snapshot)', async (t, evaluate) => {
+  await evaluate.load();
+
+  evaluate.snapshot('basic behavior', {
+    name: 'generateBanner',
+    slots: {
+      path: ['media.albumBanner', 'cool-album', 'png'],
+      alt: 'Very cool banner art.',
+      dimensions: [800, 200],
+    },
+  });
+
+  evaluate.snapshot('no dimensions', {
+    name: 'generateBanner',
+    slots: {
+      path: ['media.albumBanner', 'cool-album', 'png'],
+    },
+  });
+});