Fork me on GitHub
#clojure-spec
<
2018-07-08
>
ackerleytng04:07:17

ah actually 0.10.0-alpha3 improves testing error messages, it's exactly what i wanted!

❤️ 4
gfredericks11:07:21

I'm curious which improvement you're referring to

ackerleytng01:07:44

(deftest generative-tests
  (doseq [test-output (stest/check function-under-test {:gen gen-overrides
                                                        ::stc/opts {:num-tests 10}})]
    (testing (-> test-output :sym name)
      (is (true? (-> test-output ::stc/ret :result))))))

ackerleytng01:07:18

I do this, so previously it was just something like expected: true and actual: false

ackerleytng01:07:21

which is meaningless

ackerleytng01:07:39

but now it shows #error and dumps the error from spec

ackerleytng04:07:29

also, youre right, it should be :reporter-fn