Hello everyone. I want to write some tests for my library but I really don’t want to write example based tests. I thought spec can be an instrument for property based testing, but couldn’t find a way to transform spec (or generator) into a test. Can someone please help me with that?
With spec, the main way you do it is by writing function specs and running “check”
Spec generators are also test.check generators so you can use test check property testing too
https://clojure.org/guides/spec covers using check
@jahvenni https://github.com/arohner/spectrum is one attempt at this. I'm not sure if it's actively being worked on.
Oh this should work. Thank you very much
in fact, I find using (s/gen a-spec) to often be easier than using test.check to create generators directly