| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
 | import t from 'tap';
import {testContentFunctions} from '#test-lib';
testContentFunctions(t, 'linkArtist (unit)', async (t, evaluate) => {
  const artistObject = {};
  const linkTemplate = {};
  await evaluate.load({
    mock: evaluate.mock(mock => ({
      linkThing: {
        relations: mock.function('linkThing.relations', () => ({}))
          .args([undefined, 'localized.artist', artistObject])
          .once(),
        data: mock.function('linkThing.data', () => ({}))
          .args(['localized.artist', artistObject])
          .once(),
        generate: mock.function('linkThing.data', () => linkTemplate)
          .once(),
      }
    })),
  });
  const result = evaluate({
    name: 'linkArtist',
    args: [artistObject],
  });
  t.equal(result, linkTemplate);
});
 |