« get me outta code hell

test: provide convenient dummy transformContent mock - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-06-14 12:40:59 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-06-14 12:40:59 -0300
commit890852995527df7f6362908b039d28a72bb60f97 (patch)
tree4df64aa512253c823699a717192bc757baa7b7f3
parentfea8126fe2566f08239090be81089775910676bc (diff)
test: provide convenient dummy transformContent mock
-rw-r--r--test/lib/content-function.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/lib/content-function.js b/test/lib/content-function.js
index ac527abc..5216c4f2 100644
--- a/test/lib/content-function.js
+++ b/test/lib/content-function.js
@@ -96,6 +96,15 @@ export function testContentFunctions(t, message, fn) {
       return value;
     };
 
+    evaluate.mock.transformContent = {
+      transformContent: {
+        extraDependencies: ['html'],
+        data: content => ({content}),
+        slots: {mode: {type: 'string'}},
+        generate: ({content}) => content,
+      },
+    };
+
     await fn(t, evaluate);
 
     if (!empty(mocks)) {