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
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
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!