gulp-mocha ![Build Status](https://camo.githubusercontent.com/466521be2a3a43302b7cb7c3cb3cf5a2f5548e8133d9786e8be58c804f7ffce3/68747470733a2f2f7472617669732d63692e6f72672f73696e647265736f726875732f67756c702d6d6f6368612e7376673f6272616e63683d6d6173746572)
Run Mocha tests
Keep in mind that this is just a thin wrapper around Mocha and your issue is most likely with Mocha.
$ npm install --save-dev gulp-mocha
var gulp = require('gulp');
var mocha = require('gulp-mocha');
gulp.task('default', function () {
return gulp.src('test.js')
.pipe(mocha({reporter: 'nyan'}));
});
Type: String
Default: bdd
Values: bdd
, tdd
, qunit
, exports
The interface to use.
Type: String
Default: dot
Values: reporters
The reporter that will be used.
This option can also be used to utilize third-party reporters. For example if you npm install mocha-lcov-reporter
you can then do use mocha-lcov-reporter
as value.
Type: Array
Accepted globals.
Type: Number
Default: 2000
Test-case timeout in milliseconds.
Type: Boolean
Default: false
Bail on the first test failure.
Type: Boolean
Default: false
Ignore global leaks.
Type: String
Only run tests matching the given pattern which is internally compiled to a RegExp.
Type: Array
Modules to be required into the tests, usually only modules that don't need to be set to a var can be included (e.g should) but if you use requireGlobal the module will be added to the global scope of the tests.
Type: Boolean
Default: false
Add required modules to the global scope.