Fork me on GitHub

we are running our spec libs tests also with :advanced cljs optimizations. Seems that the cljs.spec.test.alpha/instrument doesn’t work under it. Is there a way to enable it?


let's say the spec decimal-in defined here: is exactly what i need, except that the generator it comes with results in a bigdec, where I need a double. Is there a way to make a new generator that just coerces the output of an existing generator?


basically i just need a spec and a generator for a double with a specified precision and scale

Alex Miller (Clojure team)22:09:22

Make a spec with s/decimal-in

Alex Miller (Clojure team)22:09:50

Then make a spec that wraps it with s/with-gen

Alex Miller (Clojure team)22:09:37

If you want build on the existing gen, use gen/fmap over the s/gen of the first spec