generateCoverArtwork.js 913 B

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