This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-10-18
Channels
- # aws (10)
- # beginners (43)
- # calva (1)
- # cider (7)
- # cljs-dev (83)
- # clojure (132)
- # clojure-dev (20)
- # clojure-europe (6)
- # clojure-greece (4)
- # clojure-italy (2)
- # clojure-nl (6)
- # clojure-spec (21)
- # clojure-sweden (16)
- # clojure-uk (21)
- # clojuredesign-podcast (16)
- # clojurescript (74)
- # cursive (41)
- # datomic (7)
- # emacs (3)
- # fulcro (30)
- # graalvm (3)
- # graphql (2)
- # instaparse (1)
- # jobs (1)
- # joker (13)
- # kaocha (14)
- # off-topic (118)
- # pathom (13)
- # re-frame (5)
- # reagent (22)
- # shadow-cljs (67)
- # spacemacs (7)
- # sydney (1)
- # testing (1)
- # tools-deps (82)
- # vim (4)
- # xtdb (1)
not sure how idiomatic this is but
(deftest foo-test
(is (= 1 (-> (st/check `foo)
(st/summarize-results)
:check-passed))))
okay, but let’s say it returns nil
and I want to print that out with expound, I guess I’m gonna have to run st/check
one more time?
(expound/explain-results (stest/check `foo))
would print out the reason in human readable form, right? But it doesn’t return anything, so no way to assert it.
and I can’t do something like:
(let [chk (stest/check `foo] ,,,
to re-use it for bothexplain-results
? you could use
(doto (stest/check `foo) expound/explain-results)
if sohmm really? maybe I’m thinking of something else but I thought it returned a map with useful failure info
can someone show me an example of deftest
where combination of stest/check
used with expound
https://gist.github.com/kennyjwilli/8bf30478b8a2762d2d09baabc17e2f10#gistcomment-2682609
Also apparently Kaocha can automate some of this https://cljdoc.org/d/lambdaisland/kaocha/0.0-554/doc/automatic-spec-test-check-generation