generateCoverArtwork.js 955 B

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