« get me outta code hell

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:
Diffstat (limited to 'test/snapshot')
-rw-r--r--test/snapshot/generateAlbumTrackList.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/snapshot/generateAlbumTrackList.js b/test/snapshot/generateAlbumTrackList.js
index a7c3f591..e09f1c4a 100644
--- a/test/snapshot/generateAlbumTrackList.js
+++ b/test/snapshot/generateAlbumTrackList.js
@@ -6,6 +6,9 @@ testContentFunctions(t, 'generateAlbumTrackList (snapshot)', async (t, evaluate)
     mock: {
       generateAlbumTrackListMissingDuration:
         evaluate.stubContentFunction('generateAlbumTrackListMissingDuration'),
+
+      image:
+        evaluate.stubContentFunction('image'),
     },
   });
 
@@ -46,6 +49,16 @@ testContentFunctions(t, 'generateAlbumTrackList (snapshot)', async (t, evaluate)
     tracks,
   };
 
+  const albumWithTrackSectionDescriptions = {
+    color: color1,
+    artistContribs: contribs1,
+    trackSections: [
+      {name: 'First section', tracks: tracks.slice(0, 3), description: `Why yes!`},
+      {name: 'Second section', tracks: tracks.slice(3), description: `How *contentful,* this is.`},
+    ],
+    tracks,
+  };
+
   const albumWithNoDuration = {
     color: color1,
     artistContribs: contribs1,
@@ -63,6 +76,11 @@ testContentFunctions(t, 'generateAlbumTrackList (snapshot)', async (t, evaluate)
     args: [albumWithoutTrackSections],
   });
 
+  evaluate.snapshot(`basic behavior, with descriptions`, {
+    name: 'generateAlbumTrackList',
+    args: [albumWithTrackSectionDescriptions],
+  });
+
   evaluate.snapshot(`collapseDurationScope: never`, {
     name: 'generateAlbumTrackList',
     slots: {collapseDurationScope: 'never'},