so it feels like kaocha-midje doesn't filter running the tests properly, only reporting them.
I'm trying to --focus-meta
on a (facts :focus "blah blah" ...)
and it recognizes the focus and reports only those tests, but based on the runtime it's running my expensive 1000x spec.gen tests too.
instead of the small, trivial test I asked for.
similarly when it says "failing tests pass, running all tests". it's actually running the lot both times.
I can reproduce here. I’ll dig into it more tomorrow.
It’s a bug in Expound: https://github.com/bhb/expound/issues/191
The workaround is to redefine the fdef spec (or disable instrumentation for the functions in expound):
(s/fdef expound/printer
:args (s/cat :explain-data (s/nilable map?))
:ret nil?)
kaocha-midje is really a PoC. Midje is a strange animal making it quite hard to integrate, and there doesn't seem to be a lot of demand for it anymore. The general recommendation would be to migrate to fudje, since that sits on top of clojure.test it should work well with Kaocha
My guess is that those tests are not being run by kaocha, by somewhere else e.g. as a side-effect of loading namespaces
You can verify this with --print-test-plan
, all testables except the one with :focus should be marked as :kaocha.testable/skip
hm. let me look into fudje. I'm not using any esoteric features of Midje, I just prefer it's style of (expression-under-test) => result and the ergonomics of the checkers.
I've got it running against Fudje now, but it's 0 tests, 0 assertions, 0 failures
even after emitting hundreds of failures.
it seems to be working, but the reporter is busted.
I'm going to focus on fixing my tests for now; I can debug into the reporting problem later.
ah, I figured that out in passing - they need to be wrapped in a deftest
or the reporting doesn't work.
wow, that's frustrating. a lot of my tests end up comparing my.complicated.Deftype => [similar vector]
. (= deftype vector)
is true, (= vector deftype)
is false, because my equiv
is flexible.
Midje =>
did the right thing, clojure.test's (is (= expected actual))
puts it the wrong way around. I'll have to define a custom checker for this...
I'm running comfortably on Fudje now, with a mix of my original Midje-style tests (lightly massaged to be compatible) and a few troublesome ones converted to clojure.test style.
thanks for the pointer, this is a faster, lighter environment better integrated with Kaocha.