« 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--tap-snapshots/test/snapshot/linkThing.js.test.cjs4
-rw-r--r--test/snapshot/linkThing.js11
2 files changed, 15 insertions, 0 deletions
diff --git a/tap-snapshots/test/snapshot/linkThing.js.test.cjs b/tap-snapshots/test/snapshot/linkThing.js.test.cjs
index 2e52d0a2..1a98cfdd 100644
--- a/tap-snapshots/test/snapshot/linkThing.js.test.cjs
+++ b/tap-snapshots/test/snapshot/linkThing.js.test.cjs
@@ -15,6 +15,10 @@ exports[`test/snapshot/linkThing.js TAP linkThing (snapshot) > color 1`] = `
 <a href="track/showtime-piano-refrain/" style="--primary-color: #aaccff; --dim-color: #828282">Showtime (Piano Refrain)</a>
 `
 
+exports[`test/snapshot/linkThing.js TAP linkThing (snapshot) > nested links in content stripped 1`] = `
+<a href="foo/"><b>Oooo! Very spooky.</b></a>
+`
+
 exports[`test/snapshot/linkThing.js TAP linkThing (snapshot) > preferShortName 1`] = `
 <a href="tag/five-oceanfalls/">Five</a>
 `
diff --git a/test/snapshot/linkThing.js b/test/snapshot/linkThing.js
index f76b17df..195d8c0e 100644
--- a/test/snapshot/linkThing.js
+++ b/test/snapshot/linkThing.js
@@ -73,4 +73,15 @@ testContentFunctions(t, 'linkThing (snapshot)', async (t, evaluate) => {
       name: '<3',
     }]},
   ]);
+
+  quickSnapshot('nested links in content stripped', {
+    args: ['localized.staticPage', {directory: 'foo', name: 'Foo'}],
+    slots: {
+      content:
+        html.tag('b', {[html.joinChildren]: ''}, [
+          html.tag('a', {href: 'bar'}, `Oooo!`),
+          ` Very spooky.`,
+        ]),
+    },
+  });
 });