summaryrefslogtreecommitdiff
path: root/test/dompa/round_trip_test.cljc
diff options
context:
space:
mode:
authorAsko Nõmm <asko@nmm.ee>2025-10-20 00:42:50 +0300
committerAsko Nõmm <asko@nmm.ee>2025-10-20 00:42:50 +0300
commit7644be5e3beff7ee986aa77dc47e27aac0f22e1f (patch)
treebd2bd06e2266fa98a0284042ba32ce3c30b6114f /test/dompa/round_trip_test.cljc
parent94a3ce3611522bb5112da85563c34f39c1da75c4 (diff)
#7: Fixes an issue where `!doctype` would be left out when creating nodes due to it being a void element, and adds a full HTML page test case.
Diffstat (limited to 'test/dompa/round_trip_test.cljc')
-rw-r--r--test/dompa/round_trip_test.cljc14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/dompa/round_trip_test.cljc b/test/dompa/round_trip_test.cljc
new file mode 100644
index 0000000..9413988
--- /dev/null
+++ b/test/dompa/round_trip_test.cljc
@@ -0,0 +1,14 @@
+(ns dompa.round-trip-test
+ #?(:clj (:require [clojure.test :refer [deftest is testing]]
+ [dompa.nodes :as nodes]
+ [dompa.html :as html]))
+ #?(:cljs (:require [cljs.test :refer-macros [deftest testing is]]
+ [dompa.nodes :as nodes]
+ [dompa.html :as html])))
+
+(deftest round-trip-test
+ (testing "michiel borkent website"
+ (let [input-html (slurp "test/dompa/html/michiel_borkent.html")
+ nodes (html/->nodes input-html)
+ output-html (nodes/->html nodes)]
+ (is (= input-html output-html))))) \ No newline at end of file