-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
43 lines (36 loc) · 987 Bytes
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/**
* Eventing for the app
* Copyright © 2014 Matt Styles <[email protected]>
* Licensed under the ISC license
* ---
*
*/
'use strict';
var gulp = require( 'gulp' ),
mocha = require( 'gulp-mocha' ),
plumber = require( 'gulp-plumber' ),
notify = require( 'gulp-notify' ),
gutil = require( 'gulp-util' );
gulp.task( 'test', function() {
return gulp
.src( [
'spec/**/*.js',
'!spec/fixtures/**/*',
'!spec/expected/**/*',
'!spec/utils/**/*'
])
.pipe( plumber( {
errorHandler: notify.onError( 'Test error: <%= error.message %>' )
}))
.pipe( mocha({
reporter: 'nyan',
ui: 'tdd'
}))
.on( 'error', function( err ) {
gutil.log( gutil.colors.red( err.message ) );
this.emit( 'end' );
});
});
gulp.task( 'default', [ 'test' ], function() {
gutil.log( 'Finished running tests' );
});