Fix entity test on Node

This commit is contained in:
Juho Teperi 2017-11-28 17:13:10 +02:00
parent 7a3bc4c212
commit 6eb9f4f6fb
1 changed files with 10 additions and 3 deletions

View File

@ -1078,9 +1078,16 @@
[:custom-element.foobar "foo"]))))
(deftest html-entities
(testing "entity numbers can be unescaped always"
(is (= "<i> </i>"
(server/render-to-static-markup
[:i (gstr/unescapeEntities "&nbsp;")]))))
[:i (gstr/unescapeEntities "&#160;")]))))
(when r/is-client
(testing "When DOM is available, all named entities can be unescaped"
(is (= "<i> </i>"
(server/render-to-static-markup
[:i (gstr/unescapeEntities "&nbsp;")]))))))
(defn context-wrapper []
(r/create-class