From 6eb9f4f6fb25ac81a4eaa93789757a6181119ac9 Mon Sep 17 00:00:00 2001 From: Juho Teperi Date: Tue, 28 Nov 2017 17:13:10 +0200 Subject: [PATCH] Fix entity test on Node --- test/reagenttest/testreagent.cljs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/test/reagenttest/testreagent.cljs b/test/reagenttest/testreagent.cljs index 1359ed7..35e3653 100644 --- a/test/reagenttest/testreagent.cljs +++ b/test/reagenttest/testreagent.cljs @@ -1078,9 +1078,16 @@ [:custom-element.foobar "foo"])))) (deftest html-entities - (is (= " " - (server/render-to-static-markup - [:i (gstr/unescapeEntities " ")])))) + (testing "entity numbers can be unescaped always" + (is (= " " + (server/render-to-static-markup + [:i (gstr/unescapeEntities " ")])))) + + (when r/is-client + (testing "When DOM is available, all named entities can be unescaped" + (is (= " " + (server/render-to-static-markup + [:i (gstr/unescapeEntities " ")])))))) (defn context-wrapper [] (r/create-class