kaocha

Official support channel: https://clojureverse.org/c/projects/kaocha
2020-12-08T15:25:28.255900Z

any reasons why post-summary would not be called at all?

2020-12-08T15:25:46.256600Z

I tried to add one but nothing was happening and even:

(post-summary [result]
    (assert false))
doesn't blow up when I run kaocha.repl/run :something

2020-12-08T16:02:07.258600Z

also I was trying to find a way to go through the hierarchy more easily as discussed previously but I can't really find a way to do that (I mean I can come up with something but it seems overkill), here a simplified example:

;; how do I propagate the `retry? true` from :middle to :leaf?
;; or how do I look it up at runtime assuming I have
;; `:leaf, nested`
(def
  nested
  {:val 1
   :id :root
   :tests [{:val 1
            :id :middle
            :retry? true
            :tests [{:val 2
                     :id :leaf}]}]})

plexus 2020-12-08T16:20:58.260200Z

post-summary should be called from kaocha.repl/run, if the CHANGELOG is to be believed 🙂 # 1.0.658 (2020-08-17 / 22ef88c) - the post-summary hook will also be called when invoked via kaocha.repl

2020-12-09T11:30:18.262200Z

mm I'm already on the latest version actually

2020-12-09T11:31:45.262400Z

ah yeah it works if I calls post-summary if I call it from the CLI

2020-12-09T11:31:56.262600Z

but not from kaocha.repl/run

plexus 2020-12-08T16:22:11.261300Z

(pre-test [testable test-plan]
  (update testable :kaocha.test-plan/tests (partial map #(assoc % :retry? (:retry? testable)))

plexus 2020-12-08T16:22:32.261500Z

something like that

2020-12-08T16:28:40.261600Z

ah I see that I just needed to look in the top level, I thought that I needed a generic traversal from the leaf to the suite level testable

2020-12-08T16:28:56.261800Z

makes sense

2020-12-08T16:29:14.262Z

mm maybe I have an older version