diff options
Diffstat (limited to 'test/snapshot/generateAlbumCoverArtwork.js')
-rw-r--r-- | test/snapshot/generateAlbumCoverArtwork.js | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/test/snapshot/generateAlbumCoverArtwork.js b/test/snapshot/generateAlbumCoverArtwork.js new file mode 100644 index 0000000..9244c03 --- /dev/null +++ b/test/snapshot/generateAlbumCoverArtwork.js @@ -0,0 +1,36 @@ +import t from 'tap'; + +import contentFunction from '#content-function'; +import {testContentFunctions} from '#test-lib'; + +testContentFunctions(t, 'generateAlbumCoverArtwork (snapshot)', async (t, evaluate) => { + await evaluate.load({ + mock: { + image: evaluate.stubContentFunction('image'), + }, + }); + + const album = { + directory: 'bee-forus-seatbelt-safebee', + coverArtFileExtension: 'png', + color: '#f28514', + artTags: [ + {name: 'Damara', directory: 'damara', isContentWarning: false}, + {name: 'Cronus', directory: 'cronus', isContentWarning: false}, + {name: 'Bees', directory: 'bees', isContentWarning: false}, + {name: 'creepy crawlies', isContentWarning: true}, + ], + }; + + evaluate.snapshot('display: primary', { + name: 'generateAlbumCoverArtwork', + args: [album], + slots: {mode: 'primary'}, + }); + + evaluate.snapshot('display: thumbnail', { + name: 'generateAlbumCoverArtwork', + args: [album], + slots: {mode: 'thumbnail'}, + }); +}); |