File tree Expand file tree Collapse file tree
main/clojure/cljs/analyzer Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7070(defn get-js-index
7171 " Return the currently computed Google Closure js dependency index from the
7272 compiler state."
73- ([] (get-options (current-state )))
73+ ([] (get-js-index (current-state )))
7474 ([state]
7575 (get @state :js-dependency-index )))
7676
Original file line number Diff line number Diff line change 4040 (ana-api/analyze test-cenv test-env warning-form nil
4141 {:warning-handlers [(warning-handler counter)]}))
4242 (is (= 1 @counter))))
43+
44+ (deftest get-options-test
45+ (let [state (atom {:options {:a 1 }})]
46+ (is (= {:a 1 } (ana-api/get-options state)))
47+ (ana-api/with-state state
48+ (is (= {:a 1 } (ana-api/get-options ))))))
49+
50+ (deftest get-js-index-test
51+ (let [state (atom {:js-dependency-index {:a 1 }})]
52+ (is (= {:a 1 } (ana-api/get-js-index state)))
53+ (ana-api/with-state state
54+ (is (= {:a 1 } (ana-api/get-js-index ))))))
You can’t perform that action at this time.
0 commit comments