Chapter 13Testing JavaScript

Testing JavaScript is a big subject. JavaScript’s development tools, which for years lagged behind the tools for languages like Ruby and Python, have been improving by leaps and bounds. Not only do you have really powerful client-side frameworks like Angular and Ember; you also have really good debugging tools, especially when running Chrome. Multiple testing frameworks are building ecosystems and support. There are multiple mock libraries and pure assertion matcher libraries. Entire books could be and have been written on the topic.

We’ve got one chapter. So we need to focus.

We’ll deal with two different JavaScript needs. We’ll talk about unit-testing JavaScript using the Jasmine test library. And we’re ...

Get Rails 4 Test Prescriptions now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.