-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgulpfile.js
More file actions
32 lines (27 loc) · 770 Bytes
/
gulpfile.js
File metadata and controls
32 lines (27 loc) · 770 Bytes
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
var gulp = require('gulp'),
nodemon = require('gulp-nodemon'),
gulpMocha = require('gulp-mocha'),
env = require('gulp-env'),
supertest = require('supertest') ;
var jsFiles = ['*.js', 'src/**/*.js'];
// task to reload my application when saved
gulp.task('default', function() {
nodemon({
script: 'app.js',
ext: 'js',
env: {
PORT: 8000
},
ignore: ['./node_module/**']
})
.on('restart', function() {
console.log('Restarting');
});
});
gulp.task('test', function() {
// setting environment to test
env({vars: {ENV: 'Test'}});
// setting all files to be run
gulp.src('test/*.js', {read: false})
.pipe(gulpMocha({reporter: 'spec'})) // spec or nyan
});