diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-09-23 22:58:05 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-09-23 22:58:05 -0300 |
commit | 1978f9a53b398b60bcffb582bf5b1183aff48bcc (patch) | |
tree | dcae9e22bcc45a07782711013c1a1615fba6b75c | |
parent | 9559a6febce8f1b2b5efb2c6d4ebf29484dce141 (diff) |
test: transformContent: test how email addresses are treated
-rw-r--r-- | tap-snapshots/test/snapshot/transformContent.js.test.cjs | 5 | ||||
-rw-r--r-- | test/snapshot/transformContent.js | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/tap-snapshots/test/snapshot/transformContent.js.test.cjs b/tap-snapshots/test/snapshot/transformContent.js.test.cjs index 8d29d967..0604d96c 100644 --- a/tap-snapshots/test/snapshot/transformContent.js.test.cjs +++ b/tap-snapshots/test/snapshot/transformContent.js.test.cjs @@ -14,6 +14,11 @@ exports[`test/snapshot/transformContent.js > TAP > transformContent (snapshot) > <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) > emails 1`] = ` +<p>Email cute dogs to qznebula@protonmail.com please.</p> +<p>Just kidding... <a class="external-link from-content indicate-external" href="mailto:qznebula@protonmail.com" title="External (opens in new tab)" target="_blank">unless?</a></p> +` + exports[`test/snapshot/transformContent.js > TAP > transformContent (snapshot) > escape end of tag 1`] = ` <p>My favorite album is <a style="--primary-color: #123456" href="to-localized.album/cool-album">[Tactical Omission]</a>.</p> <p>Your favorite album is <a style="--primary-color: #123456" href="to-localized.album/cool-album">[Tactical Wha-Huh-Now</a>].</p> diff --git a/test/snapshot/transformContent.js b/test/snapshot/transformContent.js index 87e337e4..fffd9ad5 100644 --- a/test/snapshot/transformContent.js +++ b/test/snapshot/transformContent.js @@ -156,6 +156,11 @@ testContentFunctions(t, 'transformContent (snapshot)', async (t, evaluate) => { `[[date:13 April 2004]], and don't ye forget it`, {mode: 'lyrics'}); + quickSnapshot( + 'emails', + `Email cute dogs to qznebula@protonmail.com please.\n` + + `Just kidding... [unless?](mailto:qznebula@protonmail.com)`); + // TODO: Snapshots for mode: inline // TODO: Snapshots for mode: single-link }); |