From 37b555f71ea6ebaea9ff183f186abc46cf9b1a67 Mon Sep 17 00:00:00 2001 From: Asko Nõmm Date: Sun, 14 Sep 2025 14:40:01 +0300 Subject: Restructure and start working on tests --- test/dompa/coordinates_test.cljc | 14 ++++++++++++++ test/dompa/html_test.cljc | 2 ++ test/dompa/nodes_test.cljc | 2 ++ test/dompa/utils_test.cljc | 2 ++ 4 files changed, 20 insertions(+) create mode 100644 test/dompa/coordinates_test.cljc create mode 100644 test/dompa/html_test.cljc create mode 100644 test/dompa/nodes_test.cljc create mode 100644 test/dompa/utils_test.cljc (limited to 'test/dompa') 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 "
hello
")))) + + (testing "Create first-pass coordinates with invalid HTML" + (is (= [[0 4]] (coordinates/compose "
hello"))) + (is (= [] (coordinates/compose "