Writing your tests in EDN files
https://biffweb.com/p/edn-tests/
I’ve previously written about my latest approach to unit tests: [Y]ou define only the input data for your function, and then the expected return value is generated by calling your function. The expected value is saved to an EDN file and checked…


@planet @clojure How do you guard against the case where you generate incorrect output because of a bug, but fail to notice because spotting errors in generated output is harder (albeit less work) than constructing correct output manually? For me it’s a big issue, but no doubt varies a lot across people and domains. My only solution is “git good”, i.e. try harder.
@planet @clojure Is the response to this perhaps simply that the benefit in reduced workload outweighs this reduction in quality?
@planet @clojure which, again, I’d guess is a trade off that must vary a lot depending on situation.