README
grunt-simple-mocha
A simple wrapper for running tests with Mocha. It's pretty much a cleaned up and plugin-ized version of this helpful Gist by johnkpaul.
If you're looking to run client-side specs with PhantomJS, you might be interested in grunt-mocha.
Updating from 0.2.x to 0.3.x
This task now depends on grunt 0.4.x. Please see the grunt 0.3 to 0.4 migration guide for more details.
Installation
Install this grunt plugin next to your project's Gruntfile.js with:
npm install grunt-simple-mocha --save-devThen add this line to your project's
grunt.jsgruntfile:grunt.loadNpmTasks('grunt-simple-mocha');
Usage
In your grunt.js:
grunt.initConfig({
simplemocha: {
//
// These are passed directly to the mocha constructor. See:
// https://github.com/mochajs/mocha/blob/master/lib/mocha.js#L56-L74
//
options: {
ui: 'bdd',
reporter: 'tap',
globals: ['window','document','