JavaScript testing frameworks require a lot of boilerplate. I grew tired of of having to set up all the files for every project, thus I decided to maintain this repo to quickly cp them into my project.
The different testing frameworks need different files, so I made a folder for each combination I used so far.
$ git clone https://github.com/js-coder/js-testing-boilerplates.git
$ cd yourProject # A git repo
$ cp -r ../js-testing-boilerplates/mocha-chai/* .
$ make init-testingAll vendor files are added with git submodules or NPM, so you can easily update them.
Each boilerplate folder contains a Makefile with these tasks:
make init-testing: Initialise the git submodules. Run this aftercping the boilerplate.make update-testing: Updates the node packages and / or the git submodules.make test: Run the test suite, with the framework's command line tool or grunt + PhantomJS.
The folders also contain grunt files, so you can easily re-run the tests when files change.
$ grunt watchmocha-node-should doesn't contain grunt, but a make test-w task.
Configuration for the travis continuous integration service is on board too!