« get me outta code hell

test: transformContent (snapshot) - [[date]], [[string]] - 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-08-08 21:20:47 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-08-08 21:20:47 -0300
commit860453fa79802768ac0b4e19efa64d0be02ef66c (patch)
treeb0a7785d8379be47efe1a07f644bb62544390b13
parentb11444bf1ef1c111c39c7e898f08014f18e1139a (diff)
test: transformContent (snapshot) - [[date]], [[string]]
-rw-r--r--tap-snapshots/test/snapshot/transformContent.js.test.cjs11
-rw-r--r--test/snapshot/transformContent.js8
2 files changed, 19 insertions, 0 deletions
diff --git a/tap-snapshots/test/snapshot/transformContent.js.test.cjs b/tap-snapshots/test/snapshot/transformContent.js.test.cjs
index 44535ec0..4b4e090f 100644
--- a/tap-snapshots/test/snapshot/transformContent.js.test.cjs
+++ b/tap-snapshots/test/snapshot/transformContent.js.test.cjs
@@ -5,6 +5,12 @@
  * Make sure to inspect the output below.  Do not ignore changes!
  */
 'use strict'
+exports[`test/snapshot/transformContent.js TAP transformContent (snapshot) > dates 1`] = `
+<p><time datetime="Thu, 13 Apr 2023 00:00:00 GMT">4/12/2023</time> Yep!</p>
+<p>Very nice: <time datetime="Fri, 25 Oct 2413 03:00:00 GMT">10/25/2413</time></p>
+
+`
+
 exports[`test/snapshot/transformContent.js TAP transformContent (snapshot) > inline images 1`] = `
 <p><img src="snooping.png"> as USUAL...</p>
 <p>What do you know? <img src="cowabunga.png" width="24" height="32"></p>
@@ -39,6 +45,11 @@ exports[`test/snapshot/transformContent.js TAP transformContent (snapshot) > non
 
 `
 
+exports[`test/snapshot/transformContent.js TAP transformContent (snapshot) > super basic string 1`] = `
+<p>Neat listing: Albums - by Date</p>
+
+`
+
 exports[`test/snapshot/transformContent.js TAP transformContent (snapshot) > two text paragraphs 1`] = `
 <p>Hello, world!</p>
 <p>Wow, this is very cool.</p>
diff --git a/test/snapshot/transformContent.js b/test/snapshot/transformContent.js
index f55ca4fa..bf09a751 100644
--- a/test/snapshot/transformContent.js
+++ b/test/snapshot/transformContent.js
@@ -57,4 +57,12 @@ testContentFunctions(t, 'transformContent (snapshot)', async (t, evaluate) => {
   quickSnapshot(
     'non-inline image #3',
       `<img src="spark.png">\nBaller.`);
+
+  quickSnapshot(
+    'dates',
+      `[[date:2023-04-13]] Yep!\nVery nice: [[date:25 October 2413]]`);
+
+  quickSnapshot(
+    'super basic string',
+      `Neat listing: [[string:listingPage.listAlbums.byDate.title]]`);
 });