terminal 1: lein repl this is the repl for the clj code terminal 2: lein repl, (run), (browser-repl) this is the repl for the cljs code terminal 3: lein test-refresh this is clj test code in auto mode terminal 4: lein cljsbuild auto this is for recompiling the cljs source and source code terminal 5: lein fsrun name of the js file containing the unit test code
and then in emacs I have two open buffers: one for the unit test code and the other for source code. As I change one or the other source file, the modern times machine starts moving, and you jump from one terminal to the other and again to the source code, or to the unit test code like Chaplin in that wonderful movie. You need to be athletic for practicing TDD!! Sometimes I'm afraid I'm too lazy to afford it. At the end of the day you are stoned :-) Mimmo On Jan 29, 2014, at 10:59 PM, Jamie Orchard-Hays <jamie...@gmail.com> wrote: > Wow. Props for the Modern Times reference! > > > On Jan 29, 2014, at 4:50 PM, Mimmo Cosenza <mimmo.cose...@gmail.com> wrote: > >> Thanks Sean. >> Ok. I'll update the various lein templates in accordance with this choice. >> >> Unfortunately we still have to wait for cljsbuild to be extended to support >> the auto mode for test subtaks. I tested the feedback-loop with fsrun >> plug-in to automate the cljsbuild test subtask.......too slow....for TDD >> >> BTW, I'm starting to get fun with this TDD.....especially when I applied it >> to cljx files.....generating clj and cljs files for both the source code and >> the unit test code and you automate the execution of the clj tests and the >> cljs file as well.....I ended up with something like 5 terminals, but was >> really fun (almost like "modern times" by C.Chaplin). >> >> mimmo >> >> On Jan 29, 2014, at 9:13 PM, Sean Johnson <belu...@acm.org> wrote: >> >>> I'm a bit more TDD inclined than the average Clojurian (having come over >>> most recently from Ruby/Rails) and I have to say speed is king in TDD. I >>> agree that source maps are life savers when you need to debug an issue in >>> browser, but I don't really see how they'd be all that useful in the >>> average TDD workflow. >>> >>> So... +1 for whitespace and no source map == speed. >>> >>> On Monday, January 27, 2014 3:34:04 AM UTC-5, Magomimmo wrote: >>>> I do not practice TDD a lot, but I think that thanks to recent events >>>> clojurescript will attract people more sensible to TDD workflows. >>>> >>>> >>>> >>>> Due to a limitation of austin and clojurescript.test regarding :none >>>> optimisation, it's not possible to use it with them. So we have to switch >>>> to :whitespace (or one of the others). >>>> >>>> >>>> >>>> But if we use :whitespace (or one of the others optimisation options) its >>>> compilation/recompilation time it's very slow compared to :none when >>>> paired with :source-map. >>>> >>>> >>>> >>>> By renouncing to :source-map option, the :whitespace >>>> compilation/re-compilation time is very fast again. >>>> >>>> >>>> >>>> The question for TDD practitioners is the following: >>>> >>>> >>>> >>>> How fundamental is the availability of cljs's source-map in a TDD >>>> workflow? Could we renounce to it in favour of a quicker TDD loop? Do you >>>> see any drawback in a TDD scenario for not having the source-map? >>>> >>>> >>>> >>>> Honestly, I use source-map rarely (never in a TDD workflow) and only for >>>> debugging purpose because it allows me to set breakpoints and inspect >>>> bindings. It seems to me that renouncing to source-map in a TDD workflow >>>> is not a big deal. >>>> >>>> >>>> >>>> Am I correct? >>>> >>>> >>>> >>>> Thanks >>>> >>>> >>>> >>>> Mimmo >>> >>> -- >>> Note that posts from new members are moderated - please be patient with >>> your first post. >>> --- >>> You received this message because you are subscribed to the Google Groups >>> "ClojureScript" group. >>> To unsubscribe from this group and stop receiving emails from it, send an >>> email to clojurescript+unsubscr...@googlegroups.com. >>> To post to this group, send email to clojurescr...@googlegroups.com. >>> Visit this group at http://groups.google.com/group/clojurescript. >> > > -- > Note that posts from new members are moderated - please be patient with your > first post. > --- > You received this message because you are subscribed to the Google Groups > "ClojureScript" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojurescript+unsubscr...@googlegroups.com. > To post to this group, send email to clojurescr...@googlegroups.com. > Visit this group at http://groups.google.com/group/clojurescript.
signature.asc
Description: Message signed with OpenPGP using GPGMail