« get me outta code hell

content: generatePageBanner -> generateBanner - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-06-15 16:58:33 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-06-15 16:58:33 -0300
commite8be35c86308eaf66fb40da311d3e1ed54662a0a (patch)
treef83a13f17e8f541cbbf0ea71f96cf4ac05d4c687
parent6389af975c93f2c35ba21636cc697251fea580d6 (diff)
content: generatePageBanner -> generateBanner
-rw-r--r--src/content/dependencies/generateAlbumBanner.js4
-rw-r--r--src/content/dependencies/generateBanner.js (renamed from src/content/dependencies/generatePageBanner.js)0
-rw-r--r--tap-snapshots/test/snapshot/generateBanner.js.test.cjs (renamed from tap-snapshots/test/snapshot/generatePageBanner.js.test.cjs)4
-rw-r--r--test/snapshot/generateBanner.js (renamed from test/snapshot/generatePageBanner.js)6
4 files changed, 7 insertions, 7 deletions
diff --git a/src/content/dependencies/generateAlbumBanner.js b/src/content/dependencies/generateAlbumBanner.js
index 155f4974..3cc141bc 100644
--- a/src/content/dependencies/generateAlbumBanner.js
+++ b/src/content/dependencies/generateAlbumBanner.js
@@ -1,5 +1,5 @@
 export default {
-  contentDependencies: ['generatePageBanner'],
+  contentDependencies: ['generateBanner'],
   extraDependencies: ['html', 'language'],
 
   relations(relation, album) {
@@ -8,7 +8,7 @@ export default {
     }
 
     return {
-      banner: relation('generatePageBanner'),
+      banner: relation('generateBanner'),
     };
   },
 
diff --git a/src/content/dependencies/generatePageBanner.js b/src/content/dependencies/generateBanner.js
index 835140a8..835140a8 100644
--- a/src/content/dependencies/generatePageBanner.js
+++ b/src/content/dependencies/generateBanner.js
diff --git a/tap-snapshots/test/snapshot/generatePageBanner.js.test.cjs b/tap-snapshots/test/snapshot/generateBanner.js.test.cjs
index fd84b074..24e49603 100644
--- a/tap-snapshots/test/snapshot/generatePageBanner.js.test.cjs
+++ b/tap-snapshots/test/snapshot/generateBanner.js.test.cjs
@@ -5,10 +5,10 @@
  * Make sure to inspect the output below.  Do not ignore changes!
  */
 'use strict'
-exports[`test/snapshot/generatePageBanner.js TAP generatePageBanner (snapshot) > basic behavior 1`] = `
+exports[`test/snapshot/generateBanner.js TAP generateBanner (snapshot) > basic behavior 1`] = `
 <div id="banner"><img src="media/album-art/cool-album/banner.png" alt="Very cool banner art." width="800" height="200"></div>
 `
 
-exports[`test/snapshot/generatePageBanner.js TAP generatePageBanner (snapshot) > no dimensions 1`] = `
+exports[`test/snapshot/generateBanner.js TAP generateBanner (snapshot) > no dimensions 1`] = `
 <div id="banner"><img src="media/album-art/cool-album/banner.png" width="1100" height="200"></div>
 `
diff --git a/test/snapshot/generatePageBanner.js b/test/snapshot/generateBanner.js
index 9ede9fce..587ce04a 100644
--- a/test/snapshot/generatePageBanner.js
+++ b/test/snapshot/generateBanner.js
@@ -1,11 +1,11 @@
 import t from 'tap';
 import {testContentFunctions} from '../lib/content-function.js';
 
-testContentFunctions(t, 'generatePageBanner (snapshot)', async (t, evaluate) => {
+testContentFunctions(t, 'generateBanner (snapshot)', async (t, evaluate) => {
   await evaluate.load();
 
   evaluate.snapshot('basic behavior', {
-    name: 'generatePageBanner',
+    name: 'generateBanner',
     slots: {
       path: ['media.albumBanner', 'cool-album', 'png'],
       alt: 'Very cool banner art.',
@@ -14,7 +14,7 @@ testContentFunctions(t, 'generatePageBanner (snapshot)', async (t, evaluate) =>
   });
 
   evaluate.snapshot('no dimensions', {
-    name: 'generatePageBanner',
+    name: 'generateBanner',
     slots: {
       path: ['media.albumBanner', 'cool-album', 'png'],
     },