(ns clarktown.parsers.link-and-image-test
(:require
[clojure.test :refer [deftest testing is]]
[clarktown.parsers.link-and-image :as link-and-image]))
(deftest link-test
(testing "Creating a link"
(is (= (link-and-image/render "[This is a link](https://example.com)" nil)
"This is a link"))
(is (= (link-and-image/render "[This-is-a-link](https://example.com)" nil)
"This-is-a-link"))
(is (= (link-and-image/render "[x] [label](link)" nil)
"[x] label"))
(is (= (link-and-image/render "[ ] [label](link)" nil)
"[ ] label")))
(testing "Creating an image"
(is (= (link-and-image/render "" nil)
"
"))))