File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,7 +46,11 @@ returns the set of all symbols naming vars in those nses."
4646(defmacro with-instrument-disabled
4747 " Disables instrument's checking of calls, within a scope."
4848 [& body]
49- `(let [orig# @#'*instrument-enabled*]
49+ ; ; Note: In order to read the value of this private var, we employ interop
50+ ; ; rather than derefing a var special. This eases specing core functions
51+ ; ; (and infinite recursion) by avoiding code generated by the var special,
52+ ; ; and also produces more compact / efficient code.
53+ `(let [orig# (.-*instrument-enabled* js/cljs.spec.test.alpha)]
5054 (set! *instrument-enabled* nil )
5155 (try
5256 ~@body
Original file line number Diff line number Diff line change 111111 (fn-2953 " abc" ))))
112112 (is @#'stest/*instrument-enabled*))
113113
114+ (s/fdef cljs.core/= :args (s/+ any?))
115+
116+ (deftest test-cljs-2956
117+ (stest/instrument 'cljs.core/=)
118+ (is (true ? (= 1 )))
119+ (is (thrown? js/Error (= )))
120+ (stest/unstrument 'cljs.core/=))
121+
114122(defn fn-2975 [x])
115123
116124(deftest test-2975
You can’t perform that action at this time.
0 commit comments