Skip to content

Commit

Permalink
feat(gen:gulp): add mocha
Browse files Browse the repository at this point in the history
  • Loading branch information
Awk34 committed May 2, 2016
1 parent 3748953 commit ead201a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
15 changes: 15 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ var path = require('path');
var Promise = require('bluebird');
var gulp = require('gulp');
var babel = require('gulp-babel');
var gulpMocha = require('gulp-mocha');
var plumber = require('gulp-plumber');
var gulpIf = require('gulp-if');
var del = require('del');
Expand All @@ -13,6 +14,15 @@ var merge = require('merge-stream');

var watching = false;

const mocha = lazypipe()
.pipe(gulpMocha, {
reporter: 'spec',
timeout: 120000,
globals: {
should: require('should')
}
});

const transpile = lazypipe()
.pipe(() => gulpIf(watching, plumber()))
.pipe(babel);
Expand Down Expand Up @@ -103,3 +113,8 @@ gulp.task('updateFixtures:test', () => {
gulp.task('updateFixtures:deps', () => {
return updateFixtures('deps');
});

gulp.task('test', () => {
return gulp.src('test/*.test.js')
.pipe(mocha())
});
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"grunt-release": "^0.13.0",
"gulp": "^3.9.1",
"gulp-if": "^2.0.0",
"gulp-mocha": "^2.2.0",
"gulp-plumber": "^1.1.0",
"jit-grunt": "~0.10.0",
"lazypipe": "^1.0.1",
Expand All @@ -77,6 +78,7 @@
"recursive-readdir": "^2.0.0",
"run-sequence": "^1.1.5",
"shelljs": "^0.6.0",
"should": "^8.3.1",
"yeoman-assert": "^2.0.0",
"yeoman-test": "^1.1.0"
},
Expand Down

0 comments on commit ead201a

Please sign in to comment.