« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/content/dependencies/generateContributionLinks.js4
-rw-r--r--src/content/dependencies/linkExternalAsIcon.js (renamed from src/content/dependencies/generateIconForURL.js)0
-rw-r--r--test/unit/content/dependencies/generateContributionLinks.js12
3 files changed, 8 insertions, 8 deletions
diff --git a/src/content/dependencies/generateContributionLinks.js b/src/content/dependencies/generateContributionLinks.js
index 18bc409d..c035c271 100644
--- a/src/content/dependencies/generateContributionLinks.js
+++ b/src/content/dependencies/generateContributionLinks.js
@@ -3,7 +3,7 @@ import {empty} from '../../util/sugar.js';
 export default {
   contentDependencies: [
     'linkArtist',
-    'generateIconForURL',
+    'linkExternalAsIcon',
   ],
 
   extraDependencies: [
@@ -21,7 +21,7 @@ export default {
       relations.artistIcons =
         contributions.map(({who}) =>
           who.urls.map(url =>
-            relation('generateIconForURL', url)));
+            relation('linkExternalAsIcon', url)));
     }
 
     return relations;
diff --git a/src/content/dependencies/generateIconForURL.js b/src/content/dependencies/linkExternalAsIcon.js
index 4473ccbf..4473ccbf 100644
--- a/src/content/dependencies/generateIconForURL.js
+++ b/src/content/dependencies/linkExternalAsIcon.js
diff --git a/test/unit/content/dependencies/generateContributionLinks.js b/test/unit/content/dependencies/generateContributionLinks.js
index 5ed8f782..a2f02ac7 100644
--- a/test/unit/content/dependencies/generateContributionLinks.js
+++ b/test/unit/content/dependencies/generateContributionLinks.js
@@ -48,13 +48,13 @@ t.test('generateContributionLinks (unit)', async t => {
             .repeat(3),
         },
 
-        generateIconForURL: {
-          data: mock.function('generateIconForURL.data', () => ({}))
+        linkExternalAsIcon: {
+          data: mock.function('linkExternalAsIcon.data', () => ({}))
             .args([artist1.urls[0]]).next()
             .args([artist3.urls[0]]).next()
             .args([artist3.urls[1]]),
 
-          generate: mock.function('generateIconForURL.generate', () => 'icon')
+          generate: mock.function('linkExternalAsIcon.generate', () => 'icon')
             .repeat(3),
         }
       })),
@@ -89,11 +89,11 @@ t.test('generateContributionLinks (unit)', async t => {
             .repeat(3),
         },
 
-        generateIconForURL: {
-          data: mock.function('generateIconForURL.data', () => ({}))
+        linkExternalAsIcon: {
+          data: mock.function('linkExternalAsIcon.data', () => ({}))
             .neverCalled(),
 
-          generate: mock.function('generateIconForURL.generate', () => 'icon')
+          generate: mock.function('linkExternalAsIcon.generate', () => 'icon')
             .neverCalled(),
         },
       })),