First you need to install node.js in order to aquire npm. Then copy the files from my template. Running
npm install on the command line installs all the dependencies. After installation tests can be run with the command
npm test. This command really runs two commands:
node_modules/mocha-phantomjs/bin/mocha-phantomjs test/runner.htmlThis runs mocha-phantomjs plugin on file runner.html
Runner.html is based on the example on mocha-phatomjs readme-page. Further dependencies can be added there.
Running npm test should display result like this:
Tests can also be run by opening runner.html in browser.