Chapter 7Testing with Intern

Much has been said about the difficulties of testing in JavaScript. It’s not so much the language as what the language is primarily used for: building interactive applications on the Web. Rocket science is hard, but writing tests for rocket software is relatively easy, because you only need to test that it computes the correct trajectories. Conversely, it’s easy to build a web application, but writing good tests—the kind that will find bugs before your users do—is a challenge.

Still, it’s a challenge worth facing head-on. The JavaScript testing ecosystem is light years beyond where it was just a few years ago. Test frameworks of all kinds have proliferated. Build systems that run automated tests before deploying ...

Get CoffeeScript, 2nd Edition 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.