Fork me on GitHub

What would be the equilvant of (use-fixtures :once around-all) in kaocha? I'm looking at the hooks documentation and it's not obvious. Maybe I'm looking in the wrong place?


ah it's okay


nvm 🙂 it works with use-fixtures too 🙂


but, out of curiosity, is there a way?


not sure what you're looking for @dharrigan? the equivalent of use-fixtures is use-fixtures 😄


if you want to run code once before/after all tests, then pre-test and post-test hooks are the way to go


Thanks! 🙂


I'm seeing a crazy issue with kaocha + cljsbuild. My kaocha tests are meant to be spawning children from a JS file which is compiled by a watching cljsbuild, so I need both running at the same time. However, if I have a completely unrelated directory with a main.js in it, kaocha runs it and the kaocha tests start failing with Failed cleaning up ClojureScript runtime and {:cljs/last-val "nil", :ws/disconnected? true, :ws/connected? false}. This would mean that kaocha is globbing or somehow running JS it's not meant to be running.


Fortunately, I've made a super simple reproduction case.


So, I've tested a bunch of different ways and it seems that this is limited to directories which are output dirs, but, in my case, target-headless-child is only the output dir in an entirely different lein profile. It has nothing to do with the headless-parent build. The fact that kaocha is running this JS is mainly an annoyance, since I'm unable to run my parent tests which require the child JS to be there for spawning workers, it's potentially also a security concern.


Second time in two days, but I'm pinging you again, @plexus. 🙂