Skip to content

Instantly share code, notes, and snippets.

Last active August 29, 2015 14:26
What would you like to do?
[nodejs:gulp] mocha watch
//npm install --save-dev gulp gulp-mocha gulp-util
var gulp = require('gulp');
var mocha = require('gulp-mocha');
var gutil = require('gulp-util');
gulp.task('mocha', function() {
return gulp.src(['test/**/*.js'], { read: false })
.pipe(mocha({ reporter: 'spec' }))
.on('error', gutil.log);
gulp.task('watch-mocha', function() {'mocha');['lib/**', 'test/**'], ['mocha']);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment