diff options
Diffstat (limited to 'test/snapshot')
-rw-r--r-- | test/snapshot/linkContribution.js | 51 |
1 files changed, 23 insertions, 28 deletions
diff --git a/test/snapshot/linkContribution.js b/test/snapshot/linkContribution.js index 44033ad3..10b1bd08 100644 --- a/test/snapshot/linkContribution.js +++ b/test/snapshot/linkContribution.js @@ -2,37 +2,33 @@ import t from 'tap'; import {testContentFunctions} from '../lib/content-function.js'; testContentFunctions(t, 'linkContribution (snapshot)', async (t, evaluate) => { - const who1 = { - name: 'Clark Powell', - directory: 'clark-powell', - urls: ['https://soundcloud.com/plazmataz'], - }; - - const who2 = { - name: 'Grounder & Scratch', - directory: 'the-big-baddies', - urls: [], - }; - - const who3 = { - name: 'Toby Fox', - directory: 'toby-fox', - urls: ['https://tobyfox.bandcamp.com/', 'https://toby.fox/'], - }; - - const what1 = null; - const what2 = 'Snooping'; - const what3 = 'Arrangement'; - await evaluate.load(); const quickSnapshot = (message, slots) => evaluate.snapshot(message, { name: 'linkContribution', multiple: [ - {args: [who1, what1]}, - {args: [who2, what2]}, - {args: [who3, what3]}, + {args: [ + {who: { + name: 'Clark Powell', + directory: 'clark-powell', + urls: ['https://soundcloud.com/plazmataz'], + }, what: null}, + ]}, + {args: [ + {who: { + name: 'Grounder & Scratch', + directory: 'the-big-baddies', + urls: [], + }, what: 'Snooping'}, + ]}, + {args: [ + {who: { + name: 'Toby Fox', + directory: 'toby-fox', + urls: ['https://tobyfox.bandcamp.com/', 'https://toby.fox/'], + }, what: 'Arrangement'}, + ]}, ], slots, }); @@ -55,7 +51,7 @@ testContentFunctions(t, 'linkContribution (snapshot)', async (t, evaluate) => { evaluate.snapshot('loads of links', { name: 'linkContribution', args: [ - {name: 'Lorem Ipsum Lover', directory: 'lorem-ipsum-lover', urls: [ + {who: {name: 'Lorem Ipsum Lover', directory: 'lorem-ipsum-lover', urls: [ 'https://loremipsum.io', 'https://loremipsum.io/generator/', 'https://loremipsum.io/#meaning', @@ -64,8 +60,7 @@ testContentFunctions(t, 'linkContribution (snapshot)', async (t, evaluate) => { 'https://loremipsum.io/#when-to-use-lorem-ipsum', 'https://loremipsum.io/#lorem-ipsum-all-the-things', 'https://loremipsum.io/#original-source', - ]}, - null, + ]}, what: null}, ], slots: {showIcons: true}, }); |