diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/data/composite/wiki-data/withParsedCommentaryEntries.js | 72 |
1 files changed, 70 insertions, 2 deletions
diff --git a/test/unit/data/composite/wiki-data/withParsedCommentaryEntries.js b/test/unit/data/composite/wiki-data/withParsedCommentaryEntries.js index babe4fae..572eed49 100644 --- a/test/unit/data/composite/wiki-data/withParsedCommentaryEntries.js +++ b/test/unit/data/composite/wiki-data/withParsedCommentaryEntries.js @@ -28,12 +28,13 @@ function stubArtist(artistName = `Test Artist`) { } t.test(`withParsedCommentaryEntries: basic behavior`, t => { - t.plan(3); + t.plan(4); const artist1 = stubArtist(`Mobius Trip`); const artist2 = stubArtist(`Hadron Kaleido`); + const artist3 = stubArtist('Homestuck'); - const artistData = [artist1, artist2]; + const artistData = [artist1, artist2, artist3]; t.match(composite, { expose: { @@ -53,6 +54,8 @@ t.test(`withParsedCommentaryEntries: basic behavior`, t => { artistDisplayText: null, annotation: null, date: null, + accessDate: null, + accessKind: null, body: `Some commentary.\nVery cool.`, }, ]); @@ -76,6 +79,8 @@ t.test(`withParsedCommentaryEntries: basic behavior`, t => { annotation: `music, art`, date: new Date('12 January 2015'), body: `First commentary entry.\nVery cool.`, + accessDate: null, + accessKind: null, }, { artists: [artist2], @@ -83,6 +88,8 @@ t.test(`withParsedCommentaryEntries: basic behavior`, t => { annotation: `moral support`, date: new Date('4 April 2022'), body: `Second commentary entry. Yes. So cool.`, + accessDate: null, + accessKind: null, }, { artists: [], @@ -90,6 +97,8 @@ t.test(`withParsedCommentaryEntries: basic behavior`, t => { annotation: `pingas`, date: new Date('25 August 2023'), body: `Oh no.. Oh dear...`, + accessDate: null, + accessKind: null, }, { artists: [artist1, artist2], @@ -97,6 +106,65 @@ t.test(`withParsedCommentaryEntries: basic behavior`, t => { annotation: null, date: null, body: `And back around we go.`, + accessDate: null, + accessKind: null, + }, + ]); + + t.same(composite.expose.compute({ + artistData, + from: + `<i>Homestuck:</i> ([Bandcamp credits blurb](https://web.archive.org/web/20201024170202/https://homestuck.bandcamp.com/track/sburban-countdown-3) on "Homestuck Vol. 1-4 (with Midnight Crew: Drawing Dead)", 10/25/2019)\n` + + `\n` + + `Written by [[artist:michael-guy-bowman|Michael Guy Bowman]]<br>\n` + + `Arrangement by [[artist:mark-j-hadley|Mark Hadley]]\n` + + `\n` + + `<i>Homestuck:</i> ([fake](https://web.archive.org/web/20201024170202/https://homestuck.bandcamp.com/fake), 7/20/2019 captured 4/13/2024)\n` + + `This isn't real!\n` + + `\n` + + `<i>Homestuck:</i> ([fake](https://homestuck.com/fake), 10/25/2011 accessed 10/27/2011)\n` + + `This isn't real either!\n` + + `\n` + + `<i>Homestuck:</i> ([fake](https://web.archive.org/web/20201024170202/https://homestuck.bandcamp.com/fake), 7/20/2019 accessed 4/13/2024)\n` + + `Not this one, neither!\n` + }), [ + { + artists: [artist3], + artistDisplayText: null, + annotation: `[Bandcamp credits blurb](https://web.archive.org/web/20201024170202/https://homestuck.bandcamp.com/track/sburban-countdown-3) on "Homestuck Vol. 1-4 (with Midnight Crew: Drawing Dead)"`, + date: new Date('10/25/2019'), + body: + `Written by [[artist:michael-guy-bowman|Michael Guy Bowman]]<br>\n` + + `Arrangement by [[artist:mark-j-hadley|Mark Hadley]]`, + accessDate: new Date('10/24/2020'), + accessKind: 'captured', + }, + { + artists: [artist3], + artistDisplayText: null, + annotation: `[fake](https://web.archive.org/web/20201024170202/https://homestuck.bandcamp.com/fake)`, + date: new Date('7/20/2019'), + body: `This isn't real!`, + accessDate: new Date('4/13/2024'), + accessKind: 'captured', + }, + { + artists: [artist3], + artistDisplayText: null, + annotation: `[fake](https://homestuck.com/fake)`, + date: new Date('10/25/2011'), + body: `This isn't real either!`, + accessDate: new Date('10/27/2011'), + accessKind: 'accessed', + }, + { + artists: [artist3], + artistDisplayText: null, + annotation: `[fake](https://web.archive.org/web/20201024170202/https://homestuck.bandcamp.com/fake)`, + date: new Date('7/20/2019'), + body: `Not this one, neither!`, + accessDate: new Date('4/13/2024'), + accessKind: 'accessed', }, ]); }); |