Commit 5542c8a7 by Ben Drucker

Allow test runs to grep

parent db0fa897
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
var gulp = require('gulp'); var gulp = require('gulp');
var plugins = require('gulp-load-plugins')(); var plugins = require('gulp-load-plugins')();
var argv = require('yargs').argv;
gulp.task('cover', function () { gulp.task('cover', function () {
return gulp.src('./src/**/*.js') return gulp.src('./src/**/*.js')
...@@ -10,6 +11,8 @@ gulp.task('cover', function () { ...@@ -10,6 +11,8 @@ gulp.task('cover', function () {
gulp.task('test', ['cover'], function () { gulp.task('test', ['cover'], function () {
return gulp.src('./test/**/*.js') return gulp.src('./test/**/*.js')
.pipe(plugins.mocha()) .pipe(plugins.mocha({
grep: argv.grep
}))
.pipe(plugins.istanbul.writeReports()); .pipe(plugins.istanbul.writeReports());
}); });
\ No newline at end of file
...@@ -36,7 +36,8 @@ ...@@ -36,7 +36,8 @@
"gulp-mocha": "1", "gulp-mocha": "1",
"jshint-stylish": "1", "jshint-stylish": "1",
"mocha": "1", "mocha": "1",
"nock": "0.42",
"sinon": "1", "sinon": "1",
"nock": "0.42" "yargs": "1"
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment