We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 455724c commit e58cf89Copy full SHA for e58cf89
src/main/cljs/cljs/spec/alpha.cljs
@@ -417,7 +417,7 @@
417
ret))))
418
(explain* [_ path via in x]
419
(if-not (map? x)
420
- [{:path path :pred 'map? :val x :via via :in in}]
+ [{:path path :pred `map? :val x :via via :in in}]
421
(let [reg (registry)]
422
(apply concat
423
(when-let [probs (->> (map (fn [pred form] (when-not (pred x) form))
src/test/cljs/cljs/spec_test.cljs
@@ -304,6 +304,9 @@
304
[] 'cljs.core/int?
305
[0 2] '(cljs.spec.alpha/& cljs.core/int? cljs.core/even?)))
306
307
+(deftest keys-explain-pred
308
+ (is (= 'cljs.core/map? (-> (s/explain-data (s/keys :req [::x]) :a) ::s/problems first :pred))))
309
+
310
(s/fdef foo.bar/cljs-2275
311
:args (s/cat :k keyword?)
312
:ret string?)
0 commit comments