gulpfile.js
var gulp = require('gulp'),
mocha = require('gulp-mocha');
gulp.task('test', function() {
return gulp.src('./test/**/*_spec.js', {read: false})
.pipe(mocha())
.once('error', function() {
process.exit(1);
})
.once('end', function(){
process.exit();
});
})
gulp.task('default');