All of that work has led us here.
- Mocha, Chai, and Expect based testing framework.
- RequireJS backed dependency system.
- PhantomJS AND in-browser testing.
- Ability to run full test suite or just one file.
- Code coverage powered by Istanbul.
- build.xml for getting started with Jenkins.
- Sample Jenkins config.xml for metrics configuration.
To get things ready, just do the following:
||Run all unit tests|
||Run all unit tests in your preferred browser|
||Run code coverage|
test:browser also have an optional argument
--file which can be passed a single file.
This is quite helpful if you are just trying to finish up a single unit test.
To run all of your unit tests:
To run one unit test:
grunt test --file test/unit/file.test.js
To run all of your unit tests in the browser:
To run one unit test in the browser:
grunt test:browser --file test/unit/file.test.js