Skip to content

Instantly share code, notes, and snippets.

@dublx
Last active August 29, 2015 14:26
Show Gist options
  • Save dublx/8e89477bb3a91aa5bd5c to your computer and use it in GitHub Desktop.
Save dublx/8e89477bb3a91aa5bd5c to your computer and use it in GitHub Desktop.

Revisions

  1. dublx revised this gist Aug 5, 2015. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions gulpfile.js
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,4 @@
    //npm install --save-dev gulp gulp-mocha gulp-util
    var gulp = require('gulp');
    var mocha = require('gulp-mocha');
    var gutil = require('gulp-util');
  2. dublx revised this gist Aug 5, 2015. No changes.
  3. dublx created this gist Aug 5, 2015.
    16 changes: 16 additions & 0 deletions gulpfile.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    var gulp = require('gulp');
    var mocha = require('gulp-mocha');
    var gutil = require('gulp-util');

    gulp.task('mocha', function() {
    return gulp.src(['test/**/*.js'], { read: false })
    .pipe(mocha({ reporter: 'spec' }))
    .on('error', gutil.log);
    });

    gulp.task('watch-mocha', function() {
    gulp.run('mocha');
    gulp.watch(['lib/**', 'test/**'], ['mocha']);
    });

    gulp.task('default',['watch-mocha'])