File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
src/test/clojure/cljs/analyzer Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 96
96
(is (= :defrecord (-> body :statements first :ret :op )))
97
97
(is (s/valid? ::a/node node))))
98
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
+ (is (= :host-call (:op node)))
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
+ (is (s/valid? ::a/node node)))
111
+ (let [node (analyze ns-env '(. " foo" -length))]
112
+ (is (= :host-field (:op node)))
113
+ (is (s/valid? ::a/node node))))
114
+
99
115
; TODO: #js
100
116
; (deftest test-js-object
101
117
; )
You can’t perform that action at this time.
0 commit comments