From 7062dcc7d32b9a639ec242ee60e0c2daeb4f1552 Mon Sep 17 00:00:00 2001 From: Asko Nõmm Date: Sun, 14 Sep 2025 18:04:31 +0300 Subject: Improve tests --- test/dompa/coordinates_test.cljc | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) (limited to 'test/dompa') diff --git a/test/dompa/coordinates_test.cljc b/test/dompa/coordinates_test.cljc index 42543b4..a827968 100644 --- a/test/dompa/coordinates_test.cljc +++ b/test/dompa/coordinates_test.cljc @@ -3,15 +3,29 @@ [dompa.coordinates :as coordinates])) (deftest compose-test - (testing "Create first-pass coordinates" - (is (= [[0 4] [5 9] [10 15]] (coordinates/compose "
hello
")))) + (testing "Create coordinates" + (is (= [[0 4] [5 9] [10 15]] + (coordinates/compose "
hello
")))) - (testing "Create first-pass coordinates with invalid HTML" - (is (= [[0 4] [5 9]] (coordinates/compose "
hello"))) - (is (= [] (coordinates/compose "hello"))) - (testing "Create first-pass coordinates with just text" - (is (= [[0 4]] (coordinates/compose "hello")))) + (is (= [] + (coordinates/compose "
"))))) \ No newline at end of file + (is (= [[0 3]] + (coordinates/compose "div>"))) + + (is (= [[0 1]] + (coordinates/compose "<>")))) + + (testing "Create coordinates with just text" + (is (= [[0 4]] + (coordinates/compose "hello")))) + + (testing "Create coordinates with text starting" + (is (= [[0 4] [5 9] [10 15]] + (coordinates/compose "hello
"))))) + +(deftest unify-test) \ No newline at end of file -- cgit v1.2.3