« get me outta code hell

content: generateAlbumTrackListItem: incl. color only if different from album - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/test/snapshot
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-06-24 18:23:11 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-06-24 18:23:11 -0300
commit971b9fb1d861682fa6f82c005244edd56f6a7377 (patch)
tree12e49e9b4d21b98b79a2fa70e5c71f857d148a6d /test/snapshot
parent5bcc678e133d1b94fce5d51b333daf6c117bf28c (diff)
content: generateAlbumTrackListItem: incl. color only if different from album
Diffstat (limited to 'test/snapshot')
-rw-r--r--test/snapshot/generateAlbumTrackList.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/test/snapshot/generateAlbumTrackList.js b/test/snapshot/generateAlbumTrackList.js
index 3fc95716..ea3cfef3 100644
--- a/test/snapshot/generateAlbumTrackList.js
+++ b/test/snapshot/generateAlbumTrackList.js
@@ -13,16 +13,20 @@ testContentFunctions(t, 'generateAlbumTrackList (snapshot)', async (t, evaluate)
     {who: {name: 'Peach', directory: 'peach', urls: ['https://peach.bandcamp.com/']}},
   ];
 
+  const color1 = '#fb07ff';
+  const color2 = '#ea2e83';
+
   const tracks = [
-    {name: 'Track 1', directory: 't1', duration: 20, artistContribs: contribs1},
-    {name: 'Track 2', directory: 't2', duration: 30, artistContribs: contribs1},
-    {name: 'Track 3', directory: 't3', duration: 40, artistContribs: contribs1},
-    {name: 'Track 4', directory: 't4', duration: 5, artistContribs: contribs2},
+    {name: 'Track 1', directory: 't1', duration: 20, artistContribs: contribs1, color: color1},
+    {name: 'Track 2', directory: 't2', duration: 30, artistContribs: contribs1, color: color1},
+    {name: 'Track 3', directory: 't3', duration: 40, artistContribs: contribs1, color: color1},
+    {name: 'Track 4', directory: 't4', duration: 5, artistContribs: contribs2, color: color2},
   ];
 
   evaluate.snapshot('basic behavior, with track sections', {
     name: 'generateAlbumTrackList',
     args: [{
+      color: color1,
       artistContribs: contribs1,
       trackSections: [
         {name: 'First section', tracks: tracks.slice(0, 3)},
@@ -35,6 +39,7 @@ testContentFunctions(t, 'generateAlbumTrackList (snapshot)', async (t, evaluate)
   evaluate.snapshot('basic behavior, default track section', {
     name: 'generateAlbumTrackList',
     args: [{
+      color: color1,
       artistContribs: contribs1,
       trackSections: [{isDefaultTrackSection: true, tracks}],
       tracks,