« get me outta code hell

generateBanner.js « snapshot « test - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/test/snapshot/generateBanner.js
blob: ab57c3ccbc71549628156a72db66a4b8a6ef7eaa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import t from 'tap';
import {testContentFunctions} from '#test-lib';

testContentFunctions(t, 'generateBanner (snapshot)', async (t, evaluate) => {
  await evaluate.load();

  evaluate.snapshot('basic behavior', {
    name: 'generateBanner',
    slots: {
      path: ['media.albumBanner', 'cool-album', 'png'],
      alt: 'Very cool banner art.',
      dimensions: [800, 200],
    },
  });

  evaluate.snapshot('no dimensions', {
    name: 'generateBanner',
    slots: {
      path: ['media.albumBanner', 'cool-album', 'png'],
    },
  });
});