summaryrefslogtreecommitdiff
path: root/test/clarktown/parsers/strikethrough_test.clj
diff options
context:
space:
mode:
authorAsko Nomm <asko@bien.ee>2022-04-09 15:03:23 +0200
committerAsko Nomm <asko@bien.ee>2022-04-09 15:03:23 +0200
commitaad4d251568125c7f3938237a8fc5d44552bbea1 (patch)
treeff7d399e9c950daf69b4d050fd5f0d2671d5095e /test/clarktown/parsers/strikethrough_test.clj
parent732eeb88b4754e7945249c650fbe79ce5c7af063 (diff)
Add full test coverage for strikethrough text (re #4)
Diffstat (limited to 'test/clarktown/parsers/strikethrough_test.clj')
-rw-r--r--test/clarktown/parsers/strikethrough_test.clj14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/clarktown/parsers/strikethrough_test.clj b/test/clarktown/parsers/strikethrough_test.clj
new file mode 100644
index 0000000..fdf6188
--- /dev/null
+++ b/test/clarktown/parsers/strikethrough_test.clj
@@ -0,0 +1,14 @@
+(ns clarktown.parsers.strikethrough-test
+ (:require
+ [clojure.test :refer [deftest testing is]]
+ [clarktown.parsers.strikethrough :as strikethrough]))
+
+
+(deftest strikethrough-test
+ (testing "Creating strikethrough text"
+ (is (= (strikethrough/render "~~This is strikethrough text.~~" nil)
+ "<del>This is strikethrough text.</del>")))
+
+ (testing "Creating strikethrough text mixed with regular text"
+ (is (= (strikethrough/render "Some other text, ~~This is strikethrough text.~~ And more text." nil)
+ "Some other text, <del>This is strikethrough text.</del> And more text.")))) \ No newline at end of file