Book Review: JavaScript testing with Jasmine by Evan Hahn


JavaScript Testing with Jasmine is a new book written by Evan Hahn and published by O'Reilly that aims to:

…explain the concepts of testing and test-driven development, as well as why they’re useful… dive into Jasmine and explain how it can help programmers test their JavaScript code… give readers an understanding of Jasmine’s concepts and syntax.
— Evan Hahn

What’s Good #

If you’re just getting started with Jasmine and want to save yourself some time researching and reading documentation and blog posts, JavaScript Testing With Jasmine is a concise read that will help take a bit of the pain out of understanding Jasmine.

Misses #

I feel like there’s some missed opportunities with the book. It doesn’t seem to offer quite enough information either for a complete beginner or for a seasoned pro.
For a novice in JavaScript or testing, it would have been useful to really dive into the methodology of test-driven development ( TDD ) and behaviour driven development ( BDD ) — ideally walking through the process of building something while teaching the principles.

For the JavaScript developer who’s already familiar with testing in JavaScript it would have been great to dive into the idiosyncrasies of Jasmine along with more practical examples and use cases that touch on complexities, gotchas and best practices.

The verdict #

If you already are comfortable using Jasmine, you’re probably not going to find much that’s new here. However, if you have a good understanding of the value of testing JavaScript and are looking to quickly get an overview of Jasmine and save some time getting started, then this short book is worth a look.


Now read this

Clean code and codebase entropy

Given enough time, no matter which best programming practices and design patterns were used, which coding standards were adhered to and how thoughtfully and elegantly code has been designed, the forces of entropy will still take their... Continue →