Monday, February 3, 2014

My path to JavaScript: Karma and Test Driven JavaScript Development book

I've started to read the book Test-Driven JavaScript Development written by Christian Johansen that both Carlos Blé and Tomás Corral recommed.

The book is great so far (after reading part one).

I wanted to follow the examples in the book so I installed JsTestDriver which is the test runner used in the book. Since the book is from 2010, I wasn't sure that JsTestDriver still were the best test runner possible, so I asked Tomás Corral.
He kindly answered me that he was now using Karma instead, because it was much faster and more effective. He also told me that he was combining it with SinonJS and Jasmine (which comes with Karma by default) and using Grunt as build tool.

Following his advice I installed and configured Karma today.

I also coded the FizzBuzz kata in JavaScript to see how it feels to work with Karma and Jasmine.

Now that everything is working (I'm using just Karma and Jasmine, not Grunt yet) I plan to use them to work through the examples in the book.


PS: Thanks a million Tomás for your advice.

No comments:

Post a Comment