generateAlbumCoverArtwork.js 980 B

123456789101112131415161718192021222324252627282930313233343536
  1. import t from 'tap';
  2. import contentFunction from '#content-function';
  3. import {testContentFunctions} from '#test-lib';
  4. testContentFunctions(t, 'generateAlbumCoverArtwork (snapshot)', async (t, evaluate) => {
  5. await evaluate.load({
  6. mock: {
  7. image: evaluate.stubContentFunction('image'),
  8. },
  9. });
  10. const album = {
  11. directory: 'bee-forus-seatbelt-safebee',
  12. coverArtFileExtension: 'png',
  13. artTags: [
  14. {name: 'Damara', directory: 'damara', isContentWarning: false},
  15. {name: 'Cronus', directory: 'cronus', isContentWarning: false},
  16. {name: 'Bees', directory: 'bees', isContentWarning: false},
  17. {name: 'creepy crawlies', isContentWarning: true},
  18. ],
  19. };
  20. evaluate.snapshot('display: primary', {
  21. name: 'generateAlbumCoverArtwork',
  22. args: [album],
  23. slots: {mode: 'primary'},
  24. });
  25. evaluate.snapshot('display: thumbnail', {
  26. name: 'generateAlbumCoverArtwork',
  27. args: [album],
  28. slots: {mode: 'thumbnail'},
  29. });
  30. });