Start with a testem.json file that includes sinon for stubbing, etc as well as any files that would be utilized in testing.
{
"framework": "mocha+chai",
"launch_in_dev": ["Chrome", "phantomjs"],
"serve_files": [
"node_modules/sinon/pkg/sinon.js",
"js/promise-polyfill.js",
"js/modules/map.js",
"js/modules/geocode.js",
"js/modules/geolocation.js",
"js/tests/**.js"
],
"launchers": {
"mocha": {
"command": "mocha js/tests"
}
},
"phantomjs_debug_port": 5050
}
- Chai
- Mocha
- Sinon
- Testem
npm install chai mocha sinon testem --save-dev