Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Coffeescript Application Development Cookbook
  • Table Of Contents Toc
Coffeescript Application Development Cookbook

Coffeescript Application Development Cookbook

By : Hatfield
4.6 (5)
close
close
Coffeescript Application Development Cookbook

Coffeescript Application Development Cookbook

4.6 (5)
By: Hatfield

Overview of this book

If you are interested in developing modern applications, this book will help you leverage the vast JavaScript ecosystem while using an elegant language, helping you avoid the shortcomings of JavaScript.
Table of Contents (13 chapters)
close
close
12
Index

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 a simple HTML form with two input boxes, a button to trigger the calculation, and then verify the answer that is displayed.

We will need to install Mocha and Zombie. These are both available as NPM packages.

Mocha has a test runner executable, so we...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Coffeescript Application Development Cookbook
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon