clojure-spec

About: http://clojure.org/about/spec Guide: http://clojure.org/guides/spec API: https://clojure.github.io/spec.alpha/clojure.spec.alpha-api.html
jumar 2021-02-27T06:14:30.095500Z

For us the most common case is working on an app in the REPL and changing functions or specs. Then you forget to call instrument and you either realize pretty late or not at all that your spec is broken or some data aren’t really passed in. We do have a decent test suite but not everything is covered so sometimes it’s only another developer who catches the issue

seancorfield 2021-02-27T06:33:25.095700Z

When I'm writing Specs, I always have an RCF with s/exercise calls to test the specs. I also tend to write a stub -test ns when I write code and then I can run the tests in it with a hot key while I'm in the source file. The key is keeping a short feedback cycle and making sure you can run "tests" or at least "sanity check expressions" easily via hot keys while you are writing code. "forget" isn't an option: write the code so you can't forget (like the do form I suggested).