testing

Testing tools, testing philosophy & methodology...
Niklas 2021-05-27T07:09:48.007Z

If they are deftests I can run them with shortcuts in my editor and I can use setup code / fixtures.

đź‘Ť 1
Niklas 2021-05-27T07:10:49.007800Z

Actually I wonder how often fixtures get called for nested tests.

Niklas 2021-05-27T07:38:23.008500Z

it doesn't seem to invoke the fixtures for the nested tests. So the behavior will be different depending on if you call the tests individually vs the grouped thing. I think that makes it less useful

NoahTheDuke 2021-05-27T13:21:51.008800Z

oo, that’s tough

NoahTheDuke 2021-05-27T13:36:49.010500Z

another idea: have the top-level tests marked with ^:subtest, but put the implementation in a function that you can call from c-test too?

(defn a-test-fn []
  (is (= 1 2)))

(defn b-test-fn []
  (is (= 1 2)))

(deftest ^:subtest a-test
  (a-test-fn))

(deftest ^:subtest b-test
  (b-test-fn))

(deftest c-test
  (a-test-fn)
  (b-test-fn))