« get me outta code hell

data steps: basic custom mocking function support - 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-03-27 12:47:04 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-03-27 12:47:04 -0300
commitc6f1011722dc6fe50afb3a63ee414c70dbfd6abf (patch)
treed13235a4b37e8264a1fbccdfad12009f7a3a4f6d /test/snapshot
parentcb13d591c6965dc52d89ec4d1e10558e6b22456b (diff)
data steps: basic custom mocking function support
I checked out a few libraries but none really behaved
the way I needed, and coding it myself means much lower-
level access, which makes certain options a lot easier
(e.g. excluding one argument of a mocked function from
assertion while matching the rest against a pattern).
Diffstat (limited to 'test/snapshot')
-rw-r--r--test/snapshot/linkArtist.js5
-rw-r--r--test/snapshot/linkTemplate.js5
2 files changed, 6 insertions, 4 deletions
diff --git a/test/snapshot/linkArtist.js b/test/snapshot/linkArtist.js
index 383dcab2..633e2ae6 100644
--- a/test/snapshot/linkArtist.js
+++ b/test/snapshot/linkArtist.js
@@ -1,8 +1,9 @@
 import t from 'tap';
-
 import {testContentFunctions} from '../lib/content-function.js';
 
-testContentFunctions(t, 'linkArtist', (t, evaluate) => {
+testContentFunctions(t, 'linkArtist', async (t, evaluate) => {
+  await evaluate.load();
+
   evaluate.snapshot({
     name: 'linkArtist',
     args: [
diff --git a/test/snapshot/linkTemplate.js b/test/snapshot/linkTemplate.js
index 6a629682..10321897 100644
--- a/test/snapshot/linkTemplate.js
+++ b/test/snapshot/linkTemplate.js
@@ -1,8 +1,9 @@
 import t from 'tap';
-
 import {testContentFunctions} from '../lib/content-function.js';
 
-testContentFunctions(t, 'linkTemplate', (t, evaluate) => {
+testContentFunctions(t, 'linkTemplate', async (t, evaluate) => {
+  await evaluate.load();
+
   evaluate.snapshot({
     name: 'linkTemplate',
     extraDependencies: {