(ns dompa.html-test
(:require [clojure.test :refer [deftest is testing]]
[dompa.html :as html]))
(deftest coordinates-test
(testing "HTML to coordinates"
(is (= {:coordinates [[0 15]
[5 9]]
:html "
hello
"}
(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
")))))