diff options
| author | Asko Nõmm <asko@nmm.ee> | 2025-09-14 14:40:01 +0300 |
|---|---|---|
| committer | Asko Nõmm <asko@nmm.ee> | 2025-09-14 14:40:01 +0300 |
| commit | 37b555f71ea6ebaea9ff183f186abc46cf9b1a67 (patch) | |
| tree | cd2fb542c4654af2bb4446a442fdc3550a813379 /test/dompa/coordinates_test.cljc | |
| parent | c9fb6f1c80a83f9e8ea88f7db3caedae57985fd7 (diff) | |
Restructure and start working on tests
Diffstat (limited to 'test/dompa/coordinates_test.cljc')
| -rw-r--r-- | test/dompa/coordinates_test.cljc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/dompa/coordinates_test.cljc b/test/dompa/coordinates_test.cljc new file mode 100644 index 0000000..efa6df5 --- /dev/null +++ b/test/dompa/coordinates_test.cljc @@ -0,0 +1,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")))))
\ No newline at end of file |
