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.


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

The Pursuit of Simplicity in Programming

Currently, I am writing some documentation and a coding styleguide with a colleague of mine. Whether it’s in our writing or in our coding, we’ve based as many of our decisions as possible on a single concept: minimizing incidental... Continue →