Fork me on GitHub
#testing
<
2021-05-27
>
Niklas07:05:48

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

👍 3
Niklas07:05:49

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

Niklas07:05:23

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

Noah Bogart13:05:51

oo, that’s tough

Noah Bogart13:05:49

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))