Fork me on GitHub
#clojure-spec
<
2022-02-07
>
Benjamin12:02:06

(defn foo [] 'fo)
(s/fdef foo :ret int?)
(stest/instrument `foo)
(foo)
I don't get how :ret in fdef works. Why doesn't it throw when I do this?

Lennart Buit12:02:03

ret specs are not instrumented by stest/instrument

Lennart Buit12:02:09

you can use stest/check to check the entire function spec, as per https://clojure.org/guides/spec#_testing

catjam 1