kaocha

Official support channel: https://clojureverse.org/c/projects/kaocha
onetom 2021-06-02T13:36:21.013300Z

how does kaocha.matcher-combinators supposed to work? do i have to load it explicitly before loading any other kaocha namespace? my output doesn't look very nicely diffed:

expected: (match? {:some.long/key 1, :other.long/key 2} {:other.long/key 22, :c 3})
  actual: {:other.long/key (mismatch 2 22),
 :c 3,
 :some.long/key (missing 1)}
compared to the nicely colored and indented output i get with the = assert-expr:
Expected:
  {:other.long/key 2, :some.long/key 1}
Actual:
  {:other.long/key -2 +22, +:c 3, -:some.long/key 1}
what am i missing? im on kaocha 1.0.861 and matcher-combinators 3.1.4

Alys Brooks 2021-06-04T20:26:06.016100Z

I think we could use better documentation for matcher-combinator support. I'll write up an issue.

👍 1
onetom 2021-06-02T13:42:28.013400Z

i see kaocha deps.edn, in its :test alias refers to the 1.5.2 version of the matcher-combinators. i tried that version and i'm still getting the same misaligned output.

onetom 2021-06-02T16:42:45.014Z

ok, i see kaocha.api/run loads the kaocha.matcher-combinators if it finds that nubank library available: https://github.com/lambdaisland/kaocha/blob/61faa2a4f647d350fefe3784c3ef707046f17610/src/kaocha/api.clj#L108-L109