Which one do you prefer and why? What are the pros and cons of each? In which scenario does each outshine the others?
I'm particularly interested in midje vs. clojure.test, but feel free to bring up other Clojure testing frameworks too.
See also Best unit testing framework for Clojure? (the answers to that question didn't provide much detail on the "why").
I haven't tried them all, but I like plain old clojure.test for the following reasons:
Sample code:
(testing "Arithmetic"
(testing "with positive integers"
(is (= 4 (+ 2 2)))
(is (= 7 (+ 3 4))))
(testing "with negative integers"
(is (= -4 (+ -2 -2)))
(is (= -1 (+ 3 -4)))))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With