An example project using all of the methods discussed in this post can be found here.
Our requirements for unit tests were as follows:
- Work with AMD modules (we use RequireJS)
- Can be run as a Grunt task as part of our build
- Can be run in a browser
- Provide coverage information
- Provide a way to mock/stub things
To meet these requirements we used a mix of different libraries and tied them together with some custom Grunt tasks.