This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-03-30
Channels
- # babashka (18)
- # beginners (90)
- # calva (33)
- # clara (6)
- # cljfx (11)
- # cljs-dev (22)
- # cljsrn (9)
- # clojure (71)
- # clojure-australia (2)
- # clojure-czech (15)
- # clojure-europe (27)
- # clojure-germany (9)
- # clojure-nl (4)
- # clojure-serbia (3)
- # clojure-uk (10)
- # clojurescript (17)
- # conjure (12)
- # data-oriented-programming (2)
- # deps-new (6)
- # fulcro (29)
- # graphql (10)
- # hugsql (6)
- # jobs (1)
- # lsp (59)
- # malli (8)
- # off-topic (76)
- # pathom (15)
- # polylith (130)
- # re-frame (9)
- # reagent (15)
- # releases (4)
- # rewrite-clj (6)
- # ring (6)
- # rum (9)
- # shadow-cljs (116)
- # specter (5)
- # testing (7)
- # tools-deps (24)
- # vim (6)
- # xtdb (17)
is it possible to exit a single test early? I want to be able to say (deftest sample (is-2 (= 1 2) "Stop here please") (is (= 1 2) "Never checked"))
and have the second is
not ran because it early exits but while still running all of the other deftest
s
as a cheap trick you could wrap each is
in an assert
Without a helper like that, you'd have to hack the clojure.test multimethods.
https://github.com/circleci/circleci.test/ implements fail-fast (at deftest level; not at is
level) so you can take some inspiration from there
I can't find anything about fail-fast
in circleci.test. have a line number for me to look at?
slightly misremembered :) it's not implemented there, but I hacked locally and also reflected my technique here https://github.com/circleci/circleci.test/issues/39
oh i see, this is about aborting all future deftests
if a given one fails. yeaeh that would be helpful but is different than i'm looking for. i'll pursue modifying/writing a wrapper for deftest
. thank you!
Kaocha implements fail-fast at the "is" level, we throw/catch a custom exception to break out of the current deftest.
That’s cool! I’ll check out Kaocha