Skip to content

Commit b7cf258

Browse files
committed
test top level expressions
1 parent 3def879 commit b7cf258

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

src/test/clojure/cljs/analyzer_tests.clj

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,17 @@
669669
(-> (binding [a/*cljs-ns* a/*cljs-ns*]
670670
(e/with-compiler-env externs-cenv
671671
(a/analyze (a/empty-env) '(js/woz))))
672-
:tag))))
672+
:tag)))
673+
(is (= 'js
674+
(-> (binding [a/*cljs-ns* a/*cljs-ns*]
675+
(e/with-compiler-env externs-cenv
676+
(a/analyze (a/empty-env) '(def foo (js/woz)))))
677+
:tag)))
678+
(is (= 'js
679+
(-> (binding [a/*cljs-ns* a/*cljs-ns*]
680+
(e/with-compiler-env externs-cenv
681+
(a/analyze (a/empty-env) '(def foo js/boz))))
682+
:tag))))
673683

674684
(comment
675685
(require '[cljs.compiler :as cc])

0 commit comments

Comments
 (0)