gavd.co.uk

My games, code, writing

JavaScript Testing with Jasmine

Book review: JavaScript Testing with Jasmine

Since going self-employed, I’ve been learning an incredible amount, very quickly! One of the tools I’ve been using is Jasmine, which is a ‘behavior-driven development framework for testing JavaScript code’.

Truth be told, I’ve used Jasmine a little bit in the past but I’ve often given up on JavaScript testing because running it on CI was such a pain in the proverbial. In the last couple of years, though, tech like Node has really meant that it’s viable to incorporate JavaScript testing right into your build loop.

I often bang on about how books are still a good way to learn things. They are for me at least. I’m writing tests with Protractor (which overlies WebDriverJS), and I’m using Jasmine for my actual tests. I recently had a holiday in Europe so, to get a comprehensive overview, I decided to buy a book off Google Play and load it onto my Nexus 7 for in-transit education. The book I chose was Evan Hahn’s JavaScript Testing with Jasmine. I figured that having it in an offline format meant that I could read it no matter what the connectivity situation was (which proved a good idea!).

The book gives you a decent overview of Jasmine. It’s nothing really that you couldn’t glean from online blog posts, Stack Overflow and the Jasmine website, but that’s not what you buy a tech book for in 2014: what you pay for is having it all organised and well-researched, all in one place, and easy to follow and this book is definitely that.

I only paid about £7 for JavaScript Testing with Jasmine and it’s money well spent. Like I say, nothing you couldn’t pick up, but this is a good crash course if Jasmine is something you’re likely to be using in the future.

As for Jasmine itself, it’s very nice, I’d definitely recommend it! This book wasn’t all I need to get to grips with testing AngularJS applications, but it definitely meant that I understood at least one part of it right away.

This article was posted in Blog. Bookmark the permalink. Follow comments with the RSS feed for this post.