kaocha 2022-02-09

Is there a way for kaocha to load a src namespace first, before any other namespace? I'm started to look at a project that uses lein + midje and for reasons, a particular namespace has to be loaded first. Trying to replicate this usings deps and kaocha, with no success so far.

🤔 1

#kaocha/v1
{:plugins [:preloads]
 :kaocha.plugin.preloads/ns-names [my.acme.specs]}

will try that!

1

is there a good reference for better diffing and error reporting? I've got a custom equality check on very large, complex values. I'd love to give a fancy deep diff of it (especially since it's probably really close to correct)

Kaocha already uses deep-diff2 library for diffing. But if you want to override it for specific equality checks I think it can be done using something like

(defmethod kaocha.report/print-expr custom= [{:keys [expected actual]}]
  (println expected actual)))
Then when you do
(is (custom= ...))
This will run

I am not super sure as this is mostly for the summary, not sure if this helps you!