diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-09-05 21:03:16 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-09-05 21:03:16 -0300 |
commit | 044ac1a804e0f42aaa13a9280ba68effc7a65606 (patch) | |
tree | cd6df28a76822c46cac9976781014edc98c8d41a /test/snapshot/transformContent.js | |
parent | a3b80f08fc54cda6a6787bcd078059823026add6 (diff) | |
parent | 0ff743b1350b1d42ba23d9701a0b7acfb7501254 (diff) |
Merge branch 'preview' into track-data-cleanup
Diffstat (limited to 'test/snapshot/transformContent.js')
-rw-r--r-- | test/snapshot/transformContent.js | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/test/snapshot/transformContent.js b/test/snapshot/transformContent.js index 25952856..b05beac1 100644 --- a/test/snapshot/transformContent.js +++ b/test/snapshot/transformContent.js @@ -2,7 +2,11 @@ import t from 'tap'; import {testContentFunctions} from '#test-lib'; testContentFunctions(t, 'transformContent (snapshot)', async (t, evaluate) => { - await evaluate.load(); + await evaluate.load({ + mock: { + image: evaluate.stubContentFunction('image'), + }, + }); const extraDependencies = { wikiData: { @@ -11,8 +15,6 @@ testContentFunctions(t, 'transformContent (snapshot)', async (t, evaluate) => { ], }, - getSizeOfImageFile: () => 0, - to: (key, ...args) => `to-${key}/${args.join('/')}`, }; @@ -50,15 +52,18 @@ testContentFunctions(t, 'transformContent (snapshot)', async (t, evaluate) => { quickSnapshot( 'non-inline image #2', - `Rad.\n<img src="spark.png">`); + `Rad.\n` + + `<img src="spark.png">`); quickSnapshot( 'non-inline image #3', - `<img src="spark.png">\nBaller.`); + `<img src="spark.png">\n` + + `Baller.`); quickSnapshot( 'dates', - `[[date:2023-04-13]] Yep!\nVery nice: [[date:25 October 2413]]`); + `[[date:2023-04-13]] Yep!\n` + + `Very nice: [[date:25 October 2413]]`); quickSnapshot( 'super basic string', |