Fork me on GitHub
#clojure-spec
<
2023-01-10
>
Ben Lieberman15:01:01

In the (presumably unlikely) case where test/check does not find any failures in a function I've spec'ed, what is the expected output? e.g., I have a function foo and I check it like so

(->> (test/check 'foo) test/summarize-results)
In my case I'm just getting back a map of {:total 0} which seems suspect to me given the docs for these functions.

Alex Miller (Clojure team)15:01:54

maybe `foo instead of 'foo ?

Alex Miller (Clojure team)15:01:18

(that is, a resolved symbol name)

Alex Miller (Clojure team)15:01:40

I suspect it's not finding foo and thus not testing anything, see the guide too https://clojure.org/guides/spec#_testing

Ben Lieberman15:01:55

oh, right. I forgot about that syntax and thought the ` was just an italicized '