Skip to content

Commit

Permalink
edit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yuhan0 committed May 14, 2022
1 parent 8801d47 commit c8d13ab
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/clj/cider/nrepl/middleware/undef_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
(is (:ex response)))))

(deftest undef-all-test
(testing "undef-all undefines all vars in namespace"
(testing "undef-all undefines all vars in namespace, except default imports"
(is (= #{"done"}
(:status (session/message {:op "eval"
:code "(do (ns other.ns (:require [clojure.walk :as walk :refer [postwalk]])))"}))))
Expand All @@ -113,6 +113,9 @@
(is (= ["#'clojure.walk/postwalk"]
(:value (session/message {:op "eval"
:code "(ns-resolve 'other.ns 'postwalk)"}))))
(is (= ["java.lang.System"]
(:value (session/message {:op "eval"
:code "(ns-resolve 'other.ns 'System)"}))))
(is (= #{"done"}
(:status (session/message {:op "undef-all"
:ns "other.ns"}))))
Expand All @@ -122,6 +125,9 @@
(is (= ["nil"]
(:value (session/message {:op "eval"
:code "(ns-resolve 'other.ns 'postwalk)"}))))
(is (= ["java.lang.System"]
(:value (session/message {:op "eval"
:code "(ns-resolve 'other.ns 'System)"}))))
(is (= ["{}"]
(:value (session/message {:op "eval"
:code "(ns-aliases 'other.ns)"}))))))

0 comments on commit c8d13ab

Please sign in to comment.