Fork me on GitHub
#kaocha
<
2019-10-03
>
vikeri14:10:08

Tips for mocking out functions and vars with kaocha? Was considering using :kaocha.hooks/wrap-run and with-redefs but got a “wrong arity” error for the wrap-run function.

vikeri14:10:32

Wrong number of args (1) passed to: main/wrap-run, thought the wrap-run should pass two args, run and config.

lread14:10:55

Heya @vilkeri, I am not if you have a special use case, but the last time I did this, I did not do anything special or kaocha specific: https://github.com/cljdoc/cljdoc/blob/7f3985e139905e729803e2d22dc9491d5907e92c/test/cljdoc/util/sqlite_cache_test.clj#L39

vikeri14:10:33

@lee Yeah I just wanted to redef functions globally that are called from a bunch of different places.