File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 12
12
[cljs.analyzer.api :as ana-api]
13
13
[cljs.compiler :as comp]
14
14
[cljs.env :as env]
15
+ [cljs.js-deps :as deps]
15
16
[cljs.test-util :refer [unsplit-lines]]
16
17
[cljs.util :as util]
17
18
[clojure.java.io :as io]
1793
1794
(is (= w2 " cljs.core/-, all arguments must be numbers, got [string] instead" ))
1794
1795
(is (= w3 " cljs.core//, all arguments must be numbers, got [number string] instead" ))
1795
1796
(is (= w4 " cljs.core/*, all arguments must be numbers, got [string] instead" )))))
1797
+
1798
+ ; ; this test does pass, but shows a current problem goog file analysis
1799
+ ; ; we only consider the functional API, we don't include information needed
1800
+ ; ; to infer usage of classes
1801
+ (deftest test-analyze-goog-ns
1802
+ (let [cenv (env/default-compiler-env )]
1803
+ (env/with-compiler-env cenv
1804
+ (ana/analyze-form-seq
1805
+ '[(ns test.foo
1806
+ (:import [goog.history Html5History]))]))
1807
+ (is (some? (get-in @cenv [::ana/namespaces 'goog.history.Html5History :defs ])))))
You can’t perform that action at this time.
0 commit comments