« get me outta code hell

test: use postprocess option in snapshots - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/test/snapshot/linkTemplate.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-04-04 13:51:52 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-04-04 13:52:17 -0300
commit9928fcbcff7cfa1aa6ec1f8437f43485e1245f21 (patch)
treecbaec1427241e2a79242ba0bbb4d205237987cd1 /test/snapshot/linkTemplate.js
parent7f94b714cdac8b19334f1e06040581c65fb81216 (diff)
test: use postprocess option in snapshots
Diffstat (limited to 'test/snapshot/linkTemplate.js')
-rw-r--r--test/snapshot/linkTemplate.js18
1 files changed, 11 insertions, 7 deletions
diff --git a/test/snapshot/linkTemplate.js b/test/snapshot/linkTemplate.js
index 07c3b501..e9a1ccd6 100644
--- a/test/snapshot/linkTemplate.js
+++ b/test/snapshot/linkTemplate.js
@@ -6,24 +6,28 @@ testContentFunctions(t, 'linkTemplate (snapshot)', async (t, evaluate) => {
 
   evaluate.snapshot('fill many slots', {
     name: 'linkTemplate',
+
     extraDependencies: {
       getColors: c => ({primary: c + 'ff', dim: c + '77'}),
     },
-  },
-    v => v
+
+    postprocess: v => v
       .slot('color', '#123456')
       .slot('href', 'https://hsmusic.wiki/media/cool file.pdf')
       .slot('hash', 'fooey')
       .slot('attributes', {class: 'dog', id: 'cat1'})
-      .slot('content', 'My Cool Link'));
+      .slot('content', 'My Cool Link'),
+  });
 
-  evaluate.snapshot('fill path slot', {
+  evaluate.snapshot('fill path slot & provide appendIndexHTML', {
     name: 'linkTemplate',
+
     extraDependencies: {
       to: (...path) => '/c*lzone/' + path.join('/') + '/',
       appendIndexHTML: true,
     },
-  },
-    v => v
-      .slot('path', ['myCoolPath', 'ham', 'pineapple', 'tomato']));
+
+    postprocess: v => v
+      .slot('path', ['myCoolPath', 'ham', 'pineapple', 'tomato']),
+  });
 });