diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-09-05 20:09:03 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-09-05 20:11:18 -0300 |
commit | de0b85d81e6392597a35196bde523b9642d7e016 (patch) | |
tree | 1b91f7cf89ac81c56a93a5f759578d745f8ea74b /test/snapshot/generateCoverArtwork.js | |
parent | ae1131e54280da63a678eb3489b02a9fb292ee8b (diff) |
test: update snapshot tests to always mock image dependency
Diffstat (limited to 'test/snapshot/generateCoverArtwork.js')
-rw-r--r-- | test/snapshot/generateCoverArtwork.js | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/test/snapshot/generateCoverArtwork.js b/test/snapshot/generateCoverArtwork.js index 21c91454..e35dd8d0 100644 --- a/test/snapshot/generateCoverArtwork.js +++ b/test/snapshot/generateCoverArtwork.js @@ -2,11 +2,11 @@ import t from 'tap'; import {testContentFunctions} from '#test-lib'; testContentFunctions(t, 'generateCoverArtwork (snapshot)', async (t, evaluate) => { - await evaluate.load(); - - const extraDependencies = { - getSizeOfImageFile: () => 0, - }; + await evaluate.load({ + mock: { + image: evaluate.stubContentFunction('image', {mock: true}), + }, + }); const artTags = [ {name: 'Damara', directory: 'damara', isContentWarning: false}, @@ -21,13 +21,11 @@ testContentFunctions(t, 'generateCoverArtwork (snapshot)', async (t, evaluate) = name: 'generateCoverArtwork', args: [artTags], slots: {path, mode: 'primary'}, - extraDependencies, }); evaluate.snapshot('display: thumbnail', { name: 'generateCoverArtwork', args: [artTags], slots: {path, mode: 'thumbnail'}, - extraDependencies, }); }); |