summaryrefslogtreecommitdiff
path: root/test/dompa/round_trip_test.cljc
blob: 9413988b151cc7f1f0758b59ccd8869aa2bd48a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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)))))