« get me outta code hell

test: use "native" slots shorthand instead of postprocess - 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-06-13 12:37:18 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-06-13 12:37:18 -0300
commit2ce5ddd844603b1c3d8f220a12603677104b7545 (patch)
tree1e3dc0183cd86c8dfc7e83336af7ae61e874bf04 /test/snapshot/linkTemplate.js
parentf8d1e6ee6e27e5539d50191b94a79d1fcb797939 (diff)
test: use "native" slots shorthand instead of postprocess
Diffstat (limited to 'test/snapshot/linkTemplate.js')
-rw-r--r--test/snapshot/linkTemplate.js18
1 files changed, 10 insertions, 8 deletions
diff --git a/test/snapshot/linkTemplate.js b/test/snapshot/linkTemplate.js
index e9a1ccd..bef0935 100644
--- a/test/snapshot/linkTemplate.js
+++ b/test/snapshot/linkTemplate.js
@@ -11,12 +11,13 @@ testContentFunctions(t, 'linkTemplate (snapshot)', async (t, evaluate) => {
       getColors: c => ({primary: c + 'ff', dim: c + '77'}),
     },
 
-    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'),
+    slots: {
+      'color': '#123456',
+      'href': 'https://hsmusic.wiki/media/cool file.pdf',
+      'hash': 'fooey',
+      'attributes': {class: 'dog', id: 'cat1'},
+      'content': 'My Cool Link',
+    },
   });
 
   evaluate.snapshot('fill path slot & provide appendIndexHTML', {
@@ -27,7 +28,8 @@ testContentFunctions(t, 'linkTemplate (snapshot)', async (t, evaluate) => {
       appendIndexHTML: true,
     },
 
-    postprocess: v => v
-      .slot('path', ['myCoolPath', 'ham', 'pineapple', 'tomato']),
+    slots: {
+      path: ['myCoolPath', 'ham', 'pineapple', 'tomato'],
+    },
   });
 });