1 | var gulp = require('gulp')
|
2 | var mocha = require('gulp-mocha')
|
3 | var gutil = require('gulp-util')
|
4 |
|
5 | gulp.task('test-node', function () {
|
6 |
|
7 | require('babel/register')
|
8 |
|
9 | global.expect = require('chai').expect
|
10 | global.sinon = require('sinon')
|
11 | require('chai').use(require('sinon-chai'))
|
12 |
|
13 | return gulp.src([ 'test/spec/**/*.spec.js' ], { read: false })
|
14 | .pipe(mocha({
|
15 | reporter: 'progress'
|
16 | }))
|
17 | .on('error', function (err) {
|
18 | gutil.log(gutil.colors.yellow(err.message))
|
19 | this.emit('end')
|
20 | })
|
21 | })
|