File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -96,9 +96,9 @@ invokes the fn you provide, enabling arbitrary stubbing and mocking.
9696Returns a collection of syms naming the vars instrumented."
9797 ([]
9898 `(instrument (instrumentable-syms )))
99- ([sym-or-syms ]
100- `(instrument ~sym-or-syms nil ))
101- ([sym-or-syms opts]
99+ ([xs ]
100+ `(instrument ~xs nil ))
101+ ([[quote sym-or-syms] opts]
102102 `(let [opts# ~opts]
103103 (reduce
104104 (fn [ret [_ f]]
@@ -109,7 +109,7 @@ Returns a collection of syms naming the vars instrumented."
109109 (collectionize ~sym-or-syms)
110110 ~@(map
111111 (fn [sym]
112- `(fn [] (instrument-1 ~sym opts#)))
112+ `(fn [] (instrument-1 ' ~sym opts#)))
113113 (collectionize ~sym-or-syms)))
114114 (filter #((instrumentable-syms opts#) (first %)))
115115 (distinct-by first))))))
Original file line number Diff line number Diff line change @@ -246,7 +246,7 @@ Returns a map as quick-check, with :explain-data added if
246246 '[cljs.spec.impl.gen :as gen]
247247 '[cljs.test :as ctest])
248248
249- (require :reload '[cjls .spec.test :as test])
249+ (require :reload '[cljs .spec.test :as test])
250250
251251 ; ; discover speced vars for your own test runner
252252 (s/speced-vars )
@@ -278,6 +278,8 @@ Returns a map as quick-check, with :explain-data added if
278278 :fn (s/and #(>= (:ret %) (-> % :args :start ))
279279 #(< (:ret %) (-> % :args :end ))))
280280
281+ (instrumentable-syms )
282+
281283 (m/instrument-1 ranged-rand {})
282284 (ranged-rand 8 5 )
283285 (defn foo
You can’t perform that action at this time.
0 commit comments