testing - Get the mocha "end" event from gulp -


i'm using gulp-mocha gulp , i'm trying notification when mocha tests completed.

this gulpfile.js

var gulp = require('gulp'); var mocha = require('gulp-mocha'); var notify = require("gulp-notify");  gulp.task('test', function () {   return gulp.src(['test/**/*.js'], { read: false })     .pipe( mocha({ reporter: 'nyan' }))     .on("error", notify.onerror({       message: 'error: <%= error.message %>'     }))     .on('end', function () {       notify( "tests passed" )     }); });  gulp.task('watch-test', function () {   gulp.watch(['./**'], ['test']); });  gulp.task( 'default', [ 'test', 'watch-test'] ); 

i managed see notification on "error" event, couldn't find way "end" event.

any idea how it?


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -