"use strict";
var gulp   = require('gulp'),
	jshint = require('gulp-jshint'),
	filter = require('gulp-filter'),
	mocha  = require('gulp-mocha');

gulp.task('default', ['test']);

gulp.task('watch', function () {
	gulp.watch('test/*.js', ['test']);
});

gulp.task('test', ['lint'], function () {
	gulp.src('test/*.js', {read: false})
		.pipe(mocha({reporter: 'spec', ui: 'bdd'}));
});

gulp.task('lint', function () {
	return gulp.src('**/*.js')
		.pipe(filter(['*', '!node_modules/**/*']))
		.pipe(jshint({node: true}))
		.pipe(jshint.reporter('default'));
});

@@ -217,27 +217,52 @@
 p.watch(
-'test
+%5B'**/*.js', '!node_modules/**
 /*.js'
+%5D
 , %5B'test

Add all .js files to gulp.watch instead of just the files under 'test/'