File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed 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."
46
46
(defmacro with-instrument-disabled
47
47
" Disables instrument's checking of calls, within a scope."
48
48
[& 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)]
50
54
(set! *instrument-enabled* nil )
51
55
(try
52
56
~@body
Original file line number Diff line number Diff line change 111
111
(fn-2953 " abc" ))))
112
112
(is @#'stest/*instrument-enabled*))
113
113
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
+
114
122
(defn fn-2975 [x])
115
123
116
124
(deftest test-2975
You can’t perform that action at this time.
0 commit comments