Fork me on GitHub
#clojure
<
2021-09-05
>
Carlo09:09:40

Does anyone know if there's a way of getting both spec instrumentation/outstrumentation and generative testing? Using Ghostwheel, I can say:

Carlo09:09:19

This works, and gives me the error in (g/check), but doesn't protest when I try to do the code in the comment (I get the exception), so I don't really get instrumentation/outstrumentation

noisesmith17:09:41

I'm sure ghostwheel's authors invented this neologism and not you, but I have to say "outstrument" is an extremely painful pun

Carlo09:09:18

Here instead I added the :outstrument true option, and now I get the warning when I execute (addition "hey" 3), but the error I get from generative testing is all garbled, something like:

| |> FAILED: addition – Spec check
| | 
{:file "Matcher.java",
 :line 1770,
 :type :error,
 :expected
 (clojure.core/and
  (clojure.core/every?
   (fn*
    [p1__12189__12191__auto__]
    (clojure.core/->
     p1__12189__12191__auto__
     :clojure.spec.test.check/ret
     :pass?))
   spec-checks__12190__auto__)
   ... many many lines ...
instead of the nice error I got before. Is there a way of getting both features?