O'Reilly logo

CoffeeScript Application Development Cookbook by Mike Hatfield

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

End-to-end testing with Mocha and Zombie.js

Mocha is a testing framework similar to QUnit but more suited for console-based testing, as opposed to browser-based testing. It has familiar describe() and it() blocks.

Zombie.js is a headless testing tool that allows us to test our application end-to-end. Using Zombie, we can open our application within a simulated browser environment and interact with the server layer of our application to verify both the backend and frontend functions as expected.

In this recipe, we will use Mocha and Zombie together as an effective tool to test our application end-to-end.

Getting ready

In our example, we will create a test that will launch our simple Calculator app and verify that it can add two numbers. We will have ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required