Mock-Testing Backbone with Sinon

To dip our toes into testing, we used Intern in Node mode. But to test the browser side of our application, we need to run our tests in a browser environment. (Well, “need” might be too strong a word. Let’s just say that testing a browser-based application in a nonbrowser environment is less than ideal.) Yet we still want the ease and automatability of command-line testing. What to do?

The answer is Selenium, a project that allows browsers to be controlled from the command line. Selenium can run on virtually any system and talk to any major browser. In fact, several providers are available to sell Selenium as a service. Rather than running Selenium on your local machine, which would limit you to the browsers ...

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.