             [sablono.compiler :refer :all])
   (:import cljs.tagged_literals.JSValue))
 
-(defn replace-js-literals [forms]
+(deftype JSValueWrapper [val]
+  Object
+  (equals [this other]
+    (and (instance? JSValueWrapper other)
+         (= (.val this) (.val other))))
+  (hashCode [this]
+    (.hashCode (.val this)))
+  (toString [this]
+    (.toString (.val this))))
+
+(defn wrap-js-value [forms]
   (prewalk
    (fn [form]
      (if (instance? JSValue form)
-       (.val form) form))
+       (JSValueWrapper. (wrap-js-value (.val form))) form))
    forms))
 
 (defn replace-gensyms [forms]

         (js/React.DOM.span
          #js {:className "caret"}))
        (js/React.DOM.ul
         #js {:role "menu", :style {:left 0}, :className "dropdown-menu"}))))))

          (is (= [3] (.val (second (.val v))))))))))

(deftest test-multiple-children
  (is (= (wrap-js-value
          '(into-array [(js/React.DOM.div #js {:id "a"})
                        (js/React.DOM.div #js {:id "b"})]))
         (wrap-js-value (html-expand [:div#a] [:div#b])))))

(deftest tag-names
  (testing "basic tags"
