Jump to ratings and reviews
Rate this book

Jasmine JavaScript Testing

Rate this book
Jasmine JavaScript Testing

146 pages, Paperback

First published January 1, 2013

8 people are currently reading
22 people want to read

About the author

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
3 (10%)
4 stars
9 (30%)
3 stars
13 (43%)
2 stars
4 (13%)
1 star
1 (3%)
Displaying 1 - 6 of 6 reviews
Profile Image for Rob.
Author 2 books442 followers
September 27, 2013
Packt Publishing recently released Jasmine JavaScript Testing by Paulo Ragonha (@pirelenito), and I just wrapped up reading it this morning. I’ve read a few books on JavaScript unit testing [1] and at least one other that was dedicated to Jasmine, [2] and this one is a strong entry.

If you’re unfamiliar with Jasmine, Ragonha will give you a solid foundation of the testing framework by the end of the second chapter. Less than 40 pages in and you’ll understand Jasmine’s approach to testing, as well as how to stand up a basic test suite. His coverage of the core functions and the collection of built-in matchers is concise and accurate. He builds on this foundation by demonstrating Jasmine’s abilities in testing everything from asynchronous code (Sinon.js!) to MVC components (Backbone.js!) to AMD modules (Require.js!).

Despite the title, Jasmine JavaScript Testing isn’t merely about the testing framework, or even just about testing. What Ragonha gives us is a book about how to write better code, using testability as the measurement of success. What is strongest about this book is how he uses a refactoring project as a frame-of-reference for telling the testability story. He’s not just talking about using Jasmine for writing tests; he’s talking about how to use it alongside the other tools and patterns that will make you a better front-end developer.

If you’re just getting started with testing JavaScript for the front-end, or if you want to see some good real-world examples, then I would definitely recommend this one.

Disclosure: I received an electronic copy of this book from the publisher in exchange for writing this review.

[1] There was Mark Ethan Trostler’s Testable JavaScript; and then there’s Nicholas Zakas’ Maintainable JavaScript which, while not technically about testing, has at least the one chapter about it.

[2] Here I refer to Evan Hahn’s JavaScript Testing with Jasmine -- not to confuse anyone over titles or anything.
Profile Image for Matt Riley.
3 reviews
February 4, 2014
This book is better than the O'Reilly title that covers Jasmine by providing more information on each aspect of the framework. The author demonstrates a clear and unmistakable understanding of the primary topic along with related secondary topics. The book does a good job incrementally building a simple application using Jasmine as the BDD framework and highlights supplemental libraries and tools that help in creating an ideal test environment.

For me, the Jasmine-specific chapters felt short and kept to a specific narrative. That's very good in terms of the sample application being built but more stand-alone examples for each core concept would have been good. When compared to the official documentation, the examples felt like they were taking a very specific approach to implementing Jasmine. That left me wondering, are the docs too simplistic or are the book samples too narrow?

As is the case with any programming book, the only way to really learn the topic is to use it building something real. This book may not throw you in the deep-end but it does more than just get your feet wet. At 146 pages it's a quick read and will point you in the right direction when getting started learning front-end BDD with Jasmine.
230 reviews6 followers
September 9, 2016
This book is great for starters of Jasmine and it talks about many aspects of writing JavaScript unit tests using Jasmine.

I would've expected a few more code samples, but the ones that are there are more like real-world examples.

The author also introduces a few other plug-ins and add-ons that will help you write better and cleaner tests. The chapter on Build automation was interesting as well and that level of automation is critical for most applications these days. This is a relatively small book, but definitely has a lot of information.
Profile Image for LAFK.
49 reviews
December 30, 2016
Returning from Security Case Study conference I read this in one sitting while riding Warszawa - Kraków train (a bit above 3 hours). This is a good tutorial book, it certainly nicely deepens documentation that Jasmine folks put online with text fixtures, AJAX tests, spies in Jasmine and BackBone app testing.

Overall good and quick read, with nice amount of code and walking readers through examples. Recommended for beginners especially, due to nice amount of explanations.
Displaying 1 - 6 of 6 reviews

Can't find what you're looking for?

Get help and learn more about the design.