Book Review – “Jasmine Cookbook”

I have been involved in doing evaluation of a lot of tools and frameworks to suite the day to day project and client needs. Recently did a research on “Jasmine” to validate and check it’s implementation feasibility for BDD when I hit “Jasmine Cookbook“.

I was quite intrigued when I received this book written by Munish Sethi, as it provides practical ways how a novice can actually learn Jasmine quickly and easily. So, is it a ideal reference book for a product team to get handson on Jasmine quickly?

In short: Yes. It acts as a great reference for the teams who want to implement Jasmine for their products. More importantly it acts as a quick reference for anyone who wants to begin with Jasmine.

This book is divided into 9 logical chapters with each chapter focusing on a particular need that any team might be having at any particular phase of a SDLC i.e. from evaluation phase till actual implementation and measurement phase. Some of the key focus areas that the writer has brought out very clearly are

  1. How Jasmine can be implemented in teams following either TDD or BDD. It becomes easy for the user to understand and implement it in the projects thereafter.
  2. All examples relate to the real world scenarios a layman might get into, hence, makes them easy to understand
  3. Provides a detailed step by step approach to write your own custom “equality” and “matcher” functions in Jasmine
  4. Performing mocking using spyOn() method, Asynchronous operations and  Implementation of Fixtures and manipulation of DOM with Jasmine tests is explained in detail.
  5. Includes practical usage and designing of Jasmine based automated tests to validate complex functionality developed using AJAX, jQuery, JSON Fixtures
  6. Apart from the automated tests, it also includes methodologies to validate the code coverage achieved through the automated tests using JavaScript Code Coverage tool Karma and Istanbul that can enable product teams to keep a check on what they are testing.

Towards the end, Jasmine integration and usage with other tools like Angular JS, Node.js and CoffeeScript is touched upon. Though these could have been detailed further, but it gives a platform to quickly start in case there is a need for these technologies. But, overall the book is a great guide for a product team to take small steps to learn and implement Jasmine as per their needs.