From 3037fdb5c30c7dbbaa7122798ac6328dc43df4ad Mon Sep 17 00:00:00 2001 From: Asko Nõmm Date: Sat, 4 Oct 2025 17:03:22 +0300 Subject: Improve test coverage --- test/dompa/html_test.cljc | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'test/dompa/html_test.cljc') diff --git a/test/dompa/html_test.cljc b/test/dompa/html_test.cljc index ab2fafd..8565fdc 100644 --- a/test/dompa/html_test.cljc +++ b/test/dompa/html_test.cljc @@ -1,2 +1,17 @@ (ns dompa.html-test - (:require [clojure.test :refer [deftest is testing]])) + (:require [clojure.test :refer [deftest is testing]] + [dompa.html :as html])) + +(deftest coordinates-test + (testing "HTML to coordinates" + (is (= [[0 15] + [5 9]] + (html/->coordinates "
hello
"))))) + +(deftest nodes-test + (testing "HTML to nodes" + (is (= [{:node/name :div + :node/attrs {} + :node/children [{:node/name :dompa/text + :node/value "hello"}]}] + (html/->nodes "
hello
"))))) -- cgit v1.2.3