diff --git a/src/test/clojure/cljs/analyzer/spec_tests.clj b/src/test/clojure/cljs/analyzer/spec_tests.clj index 8b5aab826..371520fbb 100644 --- a/src/test/clojure/cljs/analyzer/spec_tests.clj +++ b/src/test/clojure/cljs/analyzer/spec_tests.clj @@ -85,10 +85,15 @@ (is (s/valid? ::a/node (no-warn (analyze ns-env '(String.))))) (is (s/valid? ::a/node (analyze ns-env '(js/String.))))) +(deftest test-deftype + (let [node (no-warn (analyze ns-env '(deftype A [])))] + (is (= :deftype (-> node :statements first :op))) + (is (s/valid? ::a/node node)))) + (deftest test-defrecord (let [node (no-warn (analyze ns-env '(defrecord A []))) body (:body node)] - (is (= :defrecord (->> body :statements first :ret :op))) + (is (= :defrecord (-> body :statements first :ret :op))) (is (s/valid? ::a/node node)))) ; TODO: #js