This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-19
Channels
- # beginners (37)
- # boot (96)
- # cider (23)
- # clara (2)
- # cljs-dev (40)
- # clojars (1)
- # clojure (149)
- # clojure-conj (1)
- # clojure-dev (2)
- # clojure-dusseldorf (5)
- # clojure-france (82)
- # clojure-italy (1)
- # clojure-nlp (1)
- # clojure-russia (13)
- # clojure-spec (24)
- # clojure-uk (62)
- # clojurescript (131)
- # core-async (13)
- # core-logic (7)
- # data-science (1)
- # datomic (10)
- # defnpodcast (3)
- # docker (4)
- # emacs (3)
- # events (4)
- # hoplon (68)
- # klipse (4)
- # leiningen (1)
- # off-topic (5)
- # om (140)
- # onyx (16)
- # pedestal (24)
- # planck (10)
- # proton (2)
- # re-frame (9)
- # reagent (4)
- # remote-jobs (1)
- # ring-swagger (16)
- # untangled (5)
- # vim (8)
- # yada (30)
@looveh based on my reading of the source (specifically, https://github.com/clojure/clojure/blob/master/src/clj/clojure/spec/test.clj#L304), I don’t believe the default number is configurable.
hopefully I didn’t misunderstand you there - if you’re looking for how to specify the number of tests to run when you invoke check
, you’d pass an options map that looks like {:clojure.spec.test.check/opts {:num-tests 500}}
@alexmiller Thanks Alex! I'll try next opportunity
Thanks @bhagany! Yes, that was my understanding too from the docs, but the call doesn’t seem to take the option into account when I test it locally:
(cljs.spec.test/check
`my-func
{:clojure.spec.test.check/opts {:num-tests 200}}) =>
[{:spec #object[cljs.spec.t_cljs$spec16362],
:clojure.test.check/ret {:result true,
:num-tests 1000,
:seed 1476881391908},
:sym my-ns/my-func}]
Ah yes, it is different in clojurescript. I believe it's a difference in test.check iirc
would be nice to get that fixed
@liamd - my understanding of the world is that you need to either require the namespace that the spec was defined in, or require another namespace that requires that namespace