blob: efa6df57ae00026f2e041c08f5359117c6a5acd7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
(ns dompa.coordinates-test
(:require [clojure.test :refer [deftest testing is]]
[dompa.coordinates :as coordinates]))
(deftest compose-test
(testing "Create first-pass coordinates"
(is (= [[0 4] [5 9] [10 15]] (coordinates/compose "<div>hello</div>"))))
(testing "Create first-pass coordinates with invalid HTML"
(is (= [[0 4]] (coordinates/compose "<div>hello")))
(is (= [] (coordinates/compose "<div"))))
(testing "Create first-pass coordinates with just text"
(is (= [[0 4]] (coordinates/compose "hello")))))
|