diff options
-rw-r--r-- | tap-snapshots/test/snapshot/linkExternal.js.test.cjs | 80 | ||||
-rw-r--r-- | test/snapshot/linkExternal.js | 78 |
2 files changed, 151 insertions, 7 deletions
diff --git a/tap-snapshots/test/snapshot/linkExternal.js.test.cjs b/tap-snapshots/test/snapshot/linkExternal.js.test.cjs index e36ff75e..553ad792 100644 --- a/tap-snapshots/test/snapshot/linkExternal.js.test.cjs +++ b/tap-snapshots/test/snapshot/linkExternal.js.test.cjs @@ -72,47 +72,119 @@ exports[`test/snapshot/linkExternal.js > TAP > linkExternal (snapshot) > context ` exports[`test/snapshot/linkExternal.js > TAP > linkExternal (snapshot) > context: generic, style: handle 1`] = ` +<a href="https://music.apple.com/us/artist/system-of-a-down/462715" class="nowrap">Apple Music</a> +<a href="https://www.artstation.com/eevaningtea" class="nowrap">eevaningtea</a> +<a href="https://witnesstheabsurd.artstation.com/" class="nowrap">witnesstheabsurd</a> <a href="https://music.solatrus.com/" class="nowrap">music.solatrus.com</a> <a href="https://homestuck.bandcamp.com/" class="nowrap">homestuck</a> +<a href="https://bsky.app/profile/jacobtheloofah.bsky.social" class="nowrap">jacobtheloofah</a> +<a href="https://aliceflare.carrd.co" class="nowrap">aliceflare</a> +<a href="https://bigchaslappa.carrd.co/" class="nowrap">bigchaslappa</a> +<a href="https://music.deconreconstruction.com/albums/catch-322" class="nowrap">MUSIC@DCRC</a> +<a href="https://music.deconreconstruction.com/albums/catch-322?track=arcjecs-theme" class="nowrap">MUSIC@DCRC</a> +<a href="https://www.deconreconstruction.com/" class="nowrap">Deconreconstruction</a> <a href="https://www.deviantart.com/chesswanderlust-sama" class="nowrap">DeviantArt</a> -<a href="https://mspaintadventures.fandom.com/" class="nowrap">MSPA Wiki</a> -<a href="https://mspaintadventures.fandom.com/wiki/" class="nowrap">MSPA Wiki</a> <a href="https://mspaintadventures.fandom.com/wiki/Draconian_Dignitary" class="nowrap">MSPA Wiki (Draconian Dignitary)</a> +<a href="https://mspaintadventures.fandom.com/wiki/" class="nowrap">MSPA Wiki</a> +<a href="https://mspaintadventures.fandom.com/" class="nowrap">MSPA Wiki</a> <a href="https://community.fandom.com/" class="nowrap">Fandom</a> <a href="https://community.fandom.com/wiki/" class="nowrap">Fandom</a> <a href="https://community.fandom.com/wiki/Community_Central" class="nowrap">Fandom</a> +<a href="https://homestuck.com/" class="nowrap">Homestuck</a> <a href="https://www.instagram.com/levc_egm/" class="nowrap">Instagram</a> +<a href="https://tuyoki.itch.io/" class="nowrap">tuyoki</a> +<a href="https://itch.io/profile/bravelittletoreador" class="nowrap">bravelittletoreador</a> +<a href="https://ko-fi.com/gnaach" class="nowrap">gnaach</a> +<a href="https://hsmusic.wiki/feedback/" class="nowrap">Wiki Archive (local upload)</a> +<a href="https://hsmusic.wiki/media/misc/archive/Firefly%20Cloud%20Remix.mp3" class="nowrap">Wiki Archive (local upload)</a> <a href="https://types.pl/" class="nowrap">types.pl</a> +<a href="https://wodaro.neocities.org" class="nowrap">wodaro.neocities.org</a> +<a href="https://neomints.neocities.org/" class="nowrap">neomints.neocities.org</a> <a href="https://buzinkai.newgrounds.com/" class="nowrap">buzinkai</a> +<a href="https://www.newgrounds.com/audio/listen/1256058" class="nowrap">Newgrounds</a> <a href="https://www.patreon.com/CecilyRenns" class="nowrap">CecilyRenns</a> <a href="https://www.poetryfoundation.org/poets/christina-rossetti" class="nowrap">Poetry Foundation</a> +<a href="https://www.poetryfoundation.org/poems/45000/remember-56d224509b7ae" class="nowrap">Poetry Foundation</a> <a href="https://soundcloud.com/plazmataz" class="nowrap">plazmataz</a> +<a href="https://soundcloud.com/worthikids/1-i-accidentally-broke-my" class="nowrap">1-i-accidentally-broke-my</a> <a href="https://open.spotify.com/artist/63SNNpNOicDzG3LY82G4q3" class="nowrap">Spotify</a> +<a href="https://open.spotify.com/album/0iHvPD8rM3hQa0qeVtPQ3t" class="nowrap">Spotify</a> +<a href="https://open.spotify.com/track/6YEGQH32aAXb9vQQbBrPlw" class="nowrap">Spotify</a> +<a href="https://www.tiktok.com/@richaadeb" class="nowrap">richaadeb</a> <a href="https://aeritus.tumblr.com/" class="nowrap">aeritus</a> +<a href="https://vol5anthology.tumblr.com/post/159528808107/hey-everyone-its-413-and-that-means-we-have" class="nowrap">vol5anthology</a> +<a href="https://www.tumblr.com/electricwestern" class="nowrap">tumblr.com</a> +<a href="https://www.tumblr.com/spellmynamewithabang/142767566733/happy-413-this-is-the-first-time-anyones-heard" class="nowrap">tumblr.com</a> +<a href="https://www.twitch.tv/ajhebard" class="nowrap">ajhebard</a> +<a href="https://www.twitch.tv/vargskelethor/" class="nowrap">vargskelethor/</a> <a href="https://twitter.com/awkwarddoesart" class="nowrap">awkwarddoesart</a> +<a href="https://twitter.com/purenonsens/" class="nowrap">purenonsens</a> +<a href="https://twitter.com/circlejourney/status/1202265927183548416" class="nowrap">twitter.com</a> <a href="https://en.wikipedia.org/wiki/Haydn_Quartet_(vocal_ensemble)" class="nowrap">Wikipedia</a> +<a href="https://youtube.com/@bani-chan8949" class="nowrap">bani-chan8949</a> +<a href="https://www.youtube.com/@Razzie16" class="nowrap">Razzie16</a> +<a href="https://www.youtube.com/channel/UCQXfvlKkpbOqEz4BepHqK7g" class="nowrap">YouTube</a> +<a href="https://www.youtube.com/watch?v=6ekVnZm29kw" class="nowrap">YouTube</a> +<a href="https://youtu.be/WBkC038wSio" class="nowrap">YouTube</a> +<a href="https://www.youtube.com/playlist?list=PLy5UGIMKOXpONMExgI7lVYFwQa54QFp_H" class="nowrap">YouTube</a> ` exports[`test/snapshot/linkExternal.js > TAP > linkExternal (snapshot) > context: generic, style: platform 1`] = ` +<a href="https://music.apple.com/us/artist/system-of-a-down/462715" class="nowrap">Apple Music</a> +<a href="https://www.artstation.com/eevaningtea" class="nowrap">ArtStation</a> +<a href="https://witnesstheabsurd.artstation.com/" class="nowrap">ArtStation</a> <a href="https://music.solatrus.com/" class="nowrap">Bandcamp (music.solatrus.com)</a> <a href="https://homestuck.bandcamp.com/" class="nowrap">Bandcamp</a> +<a href="https://bsky.app/profile/jacobtheloofah.bsky.social" class="nowrap">Bluesky</a> +<a href="https://aliceflare.carrd.co" class="nowrap">Carrd</a> +<a href="https://bigchaslappa.carrd.co/" class="nowrap">Carrd</a> +<a href="https://music.deconreconstruction.com/albums/catch-322" class="nowrap">MUSIC@DCRC</a> +<a href="https://music.deconreconstruction.com/albums/catch-322?track=arcjecs-theme" class="nowrap">MUSIC@DCRC</a> +<a href="https://www.deconreconstruction.com/" class="nowrap">Deconreconstruction</a> <a href="https://www.deviantart.com/chesswanderlust-sama" class="nowrap">DeviantArt</a> -<a href="https://mspaintadventures.fandom.com/" class="nowrap">MSPA Wiki</a> -<a href="https://mspaintadventures.fandom.com/wiki/" class="nowrap">MSPA Wiki</a> <a href="https://mspaintadventures.fandom.com/wiki/Draconian_Dignitary" class="nowrap">MSPA Wiki (Draconian Dignitary)</a> +<a href="https://mspaintadventures.fandom.com/wiki/" class="nowrap">MSPA Wiki</a> +<a href="https://mspaintadventures.fandom.com/" class="nowrap">MSPA Wiki</a> <a href="https://community.fandom.com/" class="nowrap">Fandom</a> <a href="https://community.fandom.com/wiki/" class="nowrap">Fandom</a> <a href="https://community.fandom.com/wiki/Community_Central" class="nowrap">Fandom</a> +<a href="https://homestuck.com/" class="nowrap">Homestuck</a> <a href="https://www.instagram.com/levc_egm/" class="nowrap">Instagram</a> +<a href="https://tuyoki.itch.io/" class="nowrap">itch.io</a> +<a href="https://itch.io/profile/bravelittletoreador" class="nowrap">itch.io</a> +<a href="https://ko-fi.com/gnaach" class="nowrap">Ko-fi</a> +<a href="https://hsmusic.wiki/feedback/" class="nowrap">Wiki Archive (local upload)</a> +<a href="https://hsmusic.wiki/media/misc/archive/Firefly%20Cloud%20Remix.mp3" class="nowrap">Wiki Archive (local upload)</a> <a href="https://types.pl/" class="nowrap">Mastodon (types.pl)</a> +<a href="https://wodaro.neocities.org" class="nowrap">Neocities</a> +<a href="https://neomints.neocities.org/" class="nowrap">Neocities</a> <a href="https://buzinkai.newgrounds.com/" class="nowrap">Newgrounds</a> +<a href="https://www.newgrounds.com/audio/listen/1256058" class="nowrap">Newgrounds</a> <a href="https://www.patreon.com/CecilyRenns" class="nowrap">Patreon</a> <a href="https://www.poetryfoundation.org/poets/christina-rossetti" class="nowrap">Poetry Foundation</a> +<a href="https://www.poetryfoundation.org/poems/45000/remember-56d224509b7ae" class="nowrap">Poetry Foundation</a> <a href="https://soundcloud.com/plazmataz" class="nowrap">SoundCloud</a> +<a href="https://soundcloud.com/worthikids/1-i-accidentally-broke-my" class="nowrap">SoundCloud</a> <a href="https://open.spotify.com/artist/63SNNpNOicDzG3LY82G4q3" class="nowrap">Spotify</a> +<a href="https://open.spotify.com/album/0iHvPD8rM3hQa0qeVtPQ3t" class="nowrap">Spotify</a> +<a href="https://open.spotify.com/track/6YEGQH32aAXb9vQQbBrPlw" class="nowrap">Spotify</a> +<a href="https://www.tiktok.com/@richaadeb" class="nowrap">TikTok</a> <a href="https://aeritus.tumblr.com/" class="nowrap">Tumblr</a> +<a href="https://vol5anthology.tumblr.com/post/159528808107/hey-everyone-its-413-and-that-means-we-have" class="nowrap">Tumblr</a> +<a href="https://www.tumblr.com/electricwestern" class="nowrap">tumblr.com</a> +<a href="https://www.tumblr.com/spellmynamewithabang/142767566733/happy-413-this-is-the-first-time-anyones-heard" class="nowrap">tumblr.com</a> +<a href="https://www.twitch.tv/ajhebard" class="nowrap">Twitch</a> +<a href="https://www.twitch.tv/vargskelethor/" class="nowrap">Twitch</a> <a href="https://twitter.com/awkwarddoesart" class="nowrap">Twitter</a> +<a href="https://twitter.com/purenonsens/" class="nowrap">Twitter</a> +<a href="https://twitter.com/circlejourney/status/1202265927183548416" class="nowrap">twitter.com</a> <a href="https://en.wikipedia.org/wiki/Haydn_Quartet_(vocal_ensemble)" class="nowrap">Wikipedia</a> +<a href="https://youtube.com/@bani-chan8949" class="nowrap">YouTube</a> +<a href="https://www.youtube.com/@Razzie16" class="nowrap">YouTube</a> +<a href="https://www.youtube.com/channel/UCQXfvlKkpbOqEz4BepHqK7g" class="nowrap">YouTube</a> +<a href="https://www.youtube.com/watch?v=6ekVnZm29kw" class="nowrap">YouTube</a> +<a href="https://youtu.be/WBkC038wSio" class="nowrap">YouTube</a> +<a href="https://www.youtube.com/playlist?list=PLy5UGIMKOXpONMExgI7lVYFwQa54QFp_H" class="nowrap">YouTube</a> ` exports[`test/snapshot/linkExternal.js > TAP > linkExternal (snapshot) > unknown domain (arbitrary world wide web path) 1`] = ` diff --git a/test/snapshot/linkExternal.js b/test/snapshot/linkExternal.js index 35af656b..28ad1427 100644 --- a/test/snapshot/linkExternal.js +++ b/test/snapshot/linkExternal.js @@ -29,6 +29,12 @@ testContentFunctions(t, 'linkExternal (snapshot)', async (t, evaluate) => { // Try to comprehensively test every regular expression // (in `match` and extractions like `handle` or `details`). + // Try to *also* represent a reasonable variety of what kinds + // of URLs appear throughout the wiki. (This should serve to + // identify areas which #external-links is expected to + // accommodate, regardless whether or not there is special + // attention given in the actual descriptors.) + // For normal custom-domain matches (e.g. Mastodon), // it's OK to just test one custom domain in the list. @@ -36,50 +42,116 @@ testContentFunctions(t, 'linkExternal (snapshot)', async (t, evaluate) => { // so corresponding and missing test cases are easy to locate. quickSnapshotAllStyles('generic', [ + // platform: appleMusic + 'https://music.apple.com/us/artist/system-of-a-down/462715', + + // platform: artstation + 'https://www.artstation.com/eevaningtea', + 'https://witnesstheabsurd.artstation.com/', + // platform: bandcamp 'https://music.solatrus.com/', 'https://homestuck.bandcamp.com/', + // platform: bluesky + 'https://bsky.app/profile/jacobtheloofah.bsky.social', + + // platform: carrd + 'https://aliceflare.carrd.co', + 'https://bigchaslappa.carrd.co/', + + // platform: deconreconstruction.music + 'https://music.deconreconstruction.com/albums/catch-322', + 'https://music.deconreconstruction.com/albums/catch-322?track=arcjecs-theme', + + // platform: deconreconstruction + 'https://www.deconreconstruction.com/', + // platform: deviantart 'https://www.deviantart.com/chesswanderlust-sama', - // platform: fandom - 'https://mspaintadventures.fandom.com/', - 'https://mspaintadventures.fandom.com/wiki/', + // platform: fandom.mspaintadventures 'https://mspaintadventures.fandom.com/wiki/Draconian_Dignitary', + 'https://mspaintadventures.fandom.com/wiki/', + 'https://mspaintadventures.fandom.com/', + + // platform: fandom 'https://community.fandom.com/', 'https://community.fandom.com/wiki/', 'https://community.fandom.com/wiki/Community_Central', + // platform: homestuck + 'https://homestuck.com/', + // platform: instagram 'https://www.instagram.com/levc_egm/', + // platform: itch + 'https://tuyoki.itch.io/', + 'https://itch.io/profile/bravelittletoreador', + + // platform: ko-fi + 'https://ko-fi.com/gnaach', + + // platform: local + 'https://hsmusic.wiki/feedback/', + 'https://hsmusic.wiki/media/misc/archive/Firefly%20Cloud%20Remix.mp3', + // platform: mastodon 'https://types.pl/', + // platform: neocities + 'https://wodaro.neocities.org', + 'https://neomints.neocities.org/', + // platform: newgrounds 'https://buzinkai.newgrounds.com/', + 'https://www.newgrounds.com/audio/listen/1256058', // platform: patreon 'https://www.patreon.com/CecilyRenns', // platform: poetryFoundation 'https://www.poetryfoundation.org/poets/christina-rossetti', + 'https://www.poetryfoundation.org/poems/45000/remember-56d224509b7ae', // platform: soundcloud 'https://soundcloud.com/plazmataz', + 'https://soundcloud.com/worthikids/1-i-accidentally-broke-my', // platform: spotify 'https://open.spotify.com/artist/63SNNpNOicDzG3LY82G4q3', + 'https://open.spotify.com/album/0iHvPD8rM3hQa0qeVtPQ3t', + 'https://open.spotify.com/track/6YEGQH32aAXb9vQQbBrPlw', + + // platform: tiktok + 'https://www.tiktok.com/@richaadeb', // platform: tumblr 'https://aeritus.tumblr.com/', + 'https://vol5anthology.tumblr.com/post/159528808107/hey-everyone-its-413-and-that-means-we-have', + 'https://www.tumblr.com/electricwestern', + 'https://www.tumblr.com/spellmynamewithabang/142767566733/happy-413-this-is-the-first-time-anyones-heard', + + // platform: twitch + 'https://www.twitch.tv/ajhebard', + 'https://www.twitch.tv/vargskelethor/', // platform: twitter 'https://twitter.com/awkwarddoesart', + 'https://twitter.com/purenonsens/', + 'https://twitter.com/circlejourney/status/1202265927183548416', // platform: wikipedia 'https://en.wikipedia.org/wiki/Haydn_Quartet_(vocal_ensemble)', + + // platform: youtube + 'https://youtube.com/@bani-chan8949', + 'https://www.youtube.com/@Razzie16', + 'https://www.youtube.com/channel/UCQXfvlKkpbOqEz4BepHqK7g', + 'https://www.youtube.com/watch?v=6ekVnZm29kw', + 'https://youtu.be/WBkC038wSio', + 'https://www.youtube.com/playlist?list=PLy5UGIMKOXpONMExgI7lVYFwQa54QFp_H', ]); quickSnapshotAllStyles('album', [ |