Is there a way in clojure.test
to perform tasks before / after all tests are run? Like the :once
fixture, but for all tests instead of per-namespace.
Use cases include checking that DB is connected, running migrations, etc.
@xiongtx Not as far as I know. I've often wished for that (but I have a suspicion the lack of it is to discourage reliance of an entire test suite on environmental side effects -- by forcing you to consider setup & teardown for each group of tests independently).
Hmm, I'm not sure what's the difference between side effects for a namespace versus a test suite. But thanks, that's what I thought. For now I'm treating the first alphabetical namespace as the place to run these setups.
You know you shouldn't rely on test ordering, right @xiongtx? 🙂