Better style prop test

This commit is contained in:
Juho Teperi 2017-10-13 11:18:32 +03:00
parent 2904422bb3
commit be45ec0aa7
1 changed files with 3 additions and 7 deletions

View File

@ -8,8 +8,6 @@
[reagent.dom.server :as server]
[reagent.impl.util :as util]))
(def node? (exists? js/require))
(def tests-done (atom {}))
(defn fixture [f]
@ -1024,8 +1022,6 @@
(is (= @node nil))))
(deftest style-property-names-are-camel-cased
(is (= (if node?
"<div style=\"text-align:center\">foo</div>"
"<div style=\"text-align:center;\">foo</div>")
(server/render-to-static-markup
[:div {:style {:text-align "center"}} "foo"]))))
(is (re-find #"<div style=\"text-align:center(;?)\">foo</div>"
(server/render-to-static-markup
[:div {:style {:text-align "center"}} "foo"]))))