grunt-mocha-client
v0.0.2
Published
Grunt task for run mocha test suite in browser
Downloads
2
Maintainers
Readme
grunt-mocha-client
Grunt task for run mocha test suite in browser
Getting Started
This plugin requires Grunt ~0.4.5
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-mocha-client --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-mocha-client');
grunt-mocha-client task
Run this task with the grunt mocha-client
command.
Task targets, files and options may be specified according to the grunt Configuring tasks guide.
Options
pretty
Type: Boolean
Default: true
title
Type: String
Default: Test Runner
interface
Type: String
Default: bdd
reporter
Type: String
Default: null
Path to the reporter file (see tests/fixtures/reporter.js
)
Usage Example
module.exports = function (grunt) {
grunt.config.init({
mochaClient: {
test: {
files: {
'output.html': [ 'tests/**/*.js' ]
}
}
}
});
grunt.loadNpmTasks('grunt-mocha-client');
grunt.registerTask('default', ['mochaClient']);
};
Preview
grunt preview
Tests
grunt test
Contributors
cp cache/index.js tests/expected.html
Links
Task submitted by Alexander Abashkin