purwa-astawa
7/1/2014 - 12:40 PM

Gulp: ignore error (http://stackoverflow.com/questions/21602332/catching-gulp-mocha-errors#answers)

function handleError(err) {
  console.log(err.toString());
  this.emit('end');
}

gulp.task("test", function() {
  return gulp.src(paths.tests)
    .pipe(mocha({ reporter: "spec" })
    .on("error", handleError));
});