« get me outta code hell

don't test content functions - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/test/unit/content/dependencies/generateAlbumTrackList.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2026-03-31 19:38:31 -0300
committer(quasar) nebula <qznebula@protonmail.com>2026-03-31 19:38:31 -0300
commit33adddd56f07b60d390734b8a519238dc6c9469d (patch)
treeddf1eed04bdaad58efb91774da63ccf1b2b45ff7 /test/unit/content/dependencies/generateAlbumTrackList.js
parenta44f586bbc61bf8720770b59ece35b13b7bf0e62 (diff)
don't test content functions
Diffstat (limited to 'test/unit/content/dependencies/generateAlbumTrackList.js')
-rw-r--r--test/unit/content/dependencies/generateAlbumTrackList.js43
1 files changed, 0 insertions, 43 deletions
diff --git a/test/unit/content/dependencies/generateAlbumTrackList.js b/test/unit/content/dependencies/generateAlbumTrackList.js
deleted file mode 100644
index 988f8505..00000000
--- a/test/unit/content/dependencies/generateAlbumTrackList.js
+++ /dev/null
@@ -1,43 +0,0 @@
-import t from 'tap';
-import {testContentFunctions} from '#test-lib';
-
-testContentFunctions(t, 'generateAlbumTrackList (unit)', async (t, evaluate) => {
-  await evaluate.load({
-    mock: {
-      generateAlbumTrackListItem: {
-        extraDependencies: ['html'],
-        data: track => track.name,
-        generate: (name, {html}) =>
-          html.tag('li', `Item: ${name}`),
-      },
-
-      image:
-        evaluate.stubContentFunction('image'),
-    },
-  });
-
-  let readDuration = false;
-
-  const track = (name, duration) => ({
-    name,
-    get duration() {
-      readDuration = true;
-      return duration;
-    },
-  });
-
-  const tracks = [
-    track('Track 1', 30),
-    track('Track 2', 15),
-  ];
-
-  evaluate({
-    name: 'generateAlbumTrackList',
-    args: [{
-      trackSections: [{isDefaultTrackSection: true, tracks}],
-      tracks,
-    }],
-  });
-
-  t.notOk(readDuration, 'expect no access to track.duration property');
-});