kaocha

Official support channel: https://clojureverse.org/c/projects/kaocha
2021-03-17T15:09:28.003100Z

is it a bad thing in general to mix standard test fixtures with a custom kaocha reporter? For example we had a test fixture that was setting a dynamic var to true, to enable some reporter logic. The fixture was something like

(binding [*enable-x?* true] (try (t) .. (catch ...))
and the reporter was enabled by default in the config. It was working fine but if an exception was thrown the actual reported status of the test was not correct, and it wasn't marking it as failed/error

2021-03-17T15:10:13.004200Z

I kind of suspect that maybe mixing fixtures and kaocha reporters like this might be a bad idea, so I was thinking to create a simple plugin for that, is that the correct approach?

2021-03-17T16:02:59.006700Z

actually trying to clarify the requirements a bit more, I just need something that if there is a test failure or error • runs some arbitrary code (straight away) • prints out a string So maybe even just a wrap-runhook would work, even though maybe it would be better to do the reporting in the post-summary phase

Alys Brooks 2021-03-17T20:42:54.007800Z

Have you tried re-raising the exception after whatever fixture-specific logic?