Fork me on GitHub
#kaocha
<
2020-04-02
>
Braden Shepherdson00:04:54

so it feels like kaocha-midje doesn't filter running the tests properly, only reporting them.

Braden Shepherdson00:04:01

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.

Braden Shepherdson00:04:09

instead of the small, trivial test I asked for.

Braden Shepherdson00:04:30

similarly when it says "failing tests pass, running all tests". it's actually running the lot both times.

plexus07:04:09

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

plexus07:04:39

My guess is that those tests are not being run by kaocha, by somewhere else e.g. as a side-effect of loading namespaces

plexus07:04:15

You can verify this with --print-test-plan, all testables except the one with :focus should be marked as :kaocha.testable/skip

Braden Shepherdson13:04:38

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.

Braden Shepherdson18:04:55

I've got it running against Fudje now, but it's 0 tests, 0 assertions, 0 failures even after emitting hundreds of failures.

Braden Shepherdson18:04:40

it seems to be working, but the reporter is busted.

Braden Shepherdson18:04:54

I'm going to focus on fixing my tests for now; I can debug into the reporting problem later.

Braden Shepherdson18:04:39

ah, I figured that out in passing - they need to be wrapped in a deftest or the reporting doesn't work.

Braden Shepherdson19:04:59

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.

Braden Shepherdson19:04:33

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

Braden Shepherdson23:04:05

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.

Braden Shepherdson23:04:22

thanks for the pointer, this is a faster, lighter environment better integrated with Kaocha.