A demo setup for unit testing client-side JavaScript code with Mocha.js and Chai.js.
Since mocha 1.2, you can install mocha via Node and run mocha init to generate a client side testing skeleton inside the directory at .
This sample also includes a Karma configuration to run the tests automatically.
To use Karma, you need to have node.js and npm installed. In the project directory, type npm install karma-mocha
. After the karma install is finished, type node_modules/.bin/karma start
and navigate to http://localhost:9876
to let Karma capture the web browser and run the tests automatically.