3 ms·
When I test at the REPL, I feel like I spend lots of time trying to re-enter updated code. This means I do a lot of: A: Pasting changed code into repl B: Re-
by skatenerd 13y ago
When I test at the REPL, I feel like I spend lots of time trying to re-enter updated code. This means I do a lot of:
A: Pasting changed code into repl
B: Re-typing code
C: Hitting "previous command" and "return"
The overhead of automating this process (by making a test suite) seems high, but I haven't ever regretted it.
- emidln 13y agoYou can also get rid of this overhead by using an editor with an integrated repl (emacs+nrepl.el/slime/inferior-lisp-mode, vim+slimv/fireplace, LightTable all do this). I can type ,e to send an updated function to my repl for instance. ,b to evaluate an entire buffer. That said, you can also develop your test suite like this as well (which is a sublime experience, particularly with a generative test tool).
- jamii 13y agoIt helps to make a sandbox file that has everything imported already and just reeval the whole file - https://github.com/jamii/strucjure/blob/compiled/test/strucjure/regression/tests.clj https://github.com/jamii/strucjure/blob/compiled/test/strucj... Then you can also run the file as a free regression test - https://github.com/jamii/strucjure/blob/compiled/test/strucjure/regression.clj https://github.com/jamii/strucjure/blob/compiled/test/strucj...
- coolsunglasses 13y agohttps://github.com/aphyr/prism/ https://github.com/aphyr/prism/