« get me outta code hell

content: linkTemplate: strip <a> tags from content - 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:
author(quasar) nebula <qznebula@protonmail.com>2023-08-20 22:06:17 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-08-20 22:07:50 -0300
commit93fd751aeb3a9c0b60889db0073e7907c87f90fe (patch)
treedbf9efedc019a0ce27d37eb40e92922efee2e3f7 /test/snapshot
parent040e0d3a1d3890f7c45e2839ca949d353a160efc (diff)
content: linkTemplate: strip <a> tags from content
Diffstat (limited to 'test/snapshot')
-rw-r--r--test/snapshot/linkTemplate.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/snapshot/linkTemplate.js b/test/snapshot/linkTemplate.js
index bdb9121..7351a10 100644
--- a/test/snapshot/linkTemplate.js
+++ b/test/snapshot/linkTemplate.js
@@ -1,4 +1,5 @@
 import t from 'tap';
+import * as html from '#html';
 import {testContentFunctions} from '#test-lib';
 
 testContentFunctions(t, 'linkTemplate (snapshot)', async (t, evaluate) => {
@@ -50,4 +51,18 @@ testContentFunctions(t, 'linkTemplate (snapshot)', async (t, evaluate) => {
     name: 'linkTemplate',
     slots: {href: 'banana'},
   });
+
+  evaluate.snapshot('link in content', {
+    name: 'linkTemplate',
+    slots: {
+      hash: 'the-more-ye-know',
+      content: [
+        `Oh geez oh heck`,
+        html.tag('a', {href: 'dogs'}, `There's a link in here!!`),
+        `But here's <b>a normal tag.</b>`,
+        html.tag('div', `Gotta keep them normal tags.`),
+        html.tag('div', `But not... <a href="#">NESTED LINKS, OOO.</a>`),
+      ],
+    },
+  });
 });