Fork me on GitHub

i feel like my test setup is suboptimal. i get different results when i do lein test vs when i do \ee at a testing sexp bc i’m using use-fixtures, i assume. i have a shortcut to do :ConjureCljRunCurrentTest, but i think that also just runs the testing that i’m inside, but in any case still does different things than lein test (that’s my best way to check that things are evaluated as i’d expect) what do y’all do in order to run yer tests?


Hmm I don't use fixtures too much so I've not noticed too much about them. Conjure doesn't really do anything special when it comes to running tests, it just invokes functions under clojure.test with your var or namespace names, so it should be the same as any Clojure test runner in most ways.


You may just have to use "test this current namespace" if you want the fixtures to run though, I'm afraid I don't know how to run fixtures when running one single test.


Does anyone know more about running Clojure tests with fixtures from Conjure? I rarely use them so I'm not sure on best practices with Conjure, do you just have to run all tests for the namespace instead of one single var at a time?


I do run tests with conjure+kaocha+fixtures. Never noticed anything weird though. @UDFAV5AQP could you maybe provided a minimal example where your tests fail?


,tc to run the current test works for me, and calls the fixtures I have defined. Use that all the time. Then ,tn to test the whole namespace when done.


Could be a case of just needing a ,ef then ,tc :thinking_face: maybe the fixtures are just not evaluated? (I hope it's simple and not a bug, but I'm not ruling that out!)


I have found that re-evaluating the fixture doesn't reapply it to the deftest, you need to re-eval that (like with ,ef ) and then ,tc, but that is expected to me.


ooo… i think the <leader>[ef|eb] was the thing i needed, and maybe would also explain why it seemed to work sometimes but not others for me. in trying to create a minimal example and loading the whole file/buffer in before running the test, i couldn’t recreate the problem!


thanks, y’all!

🎉 1