From aad4d251568125c7f3938237a8fc5d44552bbea1 Mon Sep 17 00:00:00 2001 From: Asko Nomm Date: Sat, 9 Apr 2022 15:03:23 +0200 Subject: Add full test coverage for strikethrough text (re #4) --- test/clarktown/parsers/strikethrough_test.clj | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 test/clarktown/parsers/strikethrough_test.clj (limited to 'test/clarktown') 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) + "This is strikethrough text."))) + + (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, This is strikethrough text. And more text.")))) \ No newline at end of file -- cgit v1.2.3