We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d0ece88 commit 3bf3b4eCopy full SHA for 3bf3b4e
src/test/clojure/cljs/analyzer/spec_tests.clj
@@ -96,6 +96,22 @@
96
(is (= :defrecord (-> body :statements first :ret :op)))
97
(is (s/valid? ::a/node node))))
98
99
+(deftest test-host-call
100
+ (let [node (analyze ns-env '(.substring "foo" 0 1))]
101
+ (is (= :host-call (:op node)))
102
+ (is (s/valid? ::a/node node)))
103
+ (let [node (analyze ns-env '(. "foo" (substring 0 1)))]
104
105
+ (is (s/valid? ::a/node node))))
106
+
107
+(deftest test-host-field
108
+ (let [node (analyze ns-env '(.-length "foo"))]
109
+ (is (= :host-field (:op node)))
110
111
+ (let [node (analyze ns-env '(. "foo" -length))]
112
113
114
115
; TODO: #js
116
;(deftest test-js-object
117
; )
0 commit comments