A sample build environment for JavaScript projects using Jasmine for testing
Prerequisites:
- install node.js
then
npm install
npm install -g grunt-cli
run all tests
file://(path-to)/src/test/index.html
run app
file://(path-to)/src/index.html
continuously lint and test on every save
grunt watch
perform static analysis
grunt lint
run all tests (results in output\testresults)
grunt test
produce test coverage statistics in html format (in output\coverage\index.html)
grunt coverage:html
produce test coverage statistics in cobertura format (in output\coverage\cobertura)
grunt coverage:cobertura