stefanbuck/generator-node-gulp — pull request #11 by sanemat (2014-06-04 12:34:07+00:00)
Title: Handle gulp-mocha error when `gulp watch`

gulp-mocha throw error when test fails, but this repos' gulpfile does
not handle error, then gulp-watch aborts.

Unhandled 'error' event
https://gist.github.com/sanemat/534c65b722d1e0bb91c7

I added error handler like stackoverflow's solution.

related resources:
http://stackoverflow.com/questions/21602332/catching-gulp-mocha-errors
Failing tests causes gulp watch process to terminate sindresorhus/gulp-mocha
https://github.com/sindresorhus/gulp-mocha/issues/5
https://github.com/gulpjs/gulp/blob/master/docs/recipes/mocha-test-runner-with-gulp.md