File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -261,6 +261,19 @@ gulp.task('serve', cb => {
261261 cb);
262262} ) ;
263263
264+ gulp . task ( 'test' , cb => {
265+ return runSequence ( 'test:server' , 'test:client' , cb ) ;
266+ } ) ;
267+
268+ gulp . task ( 'test:server' , cb => {
269+ runSequence (
270+ 'env:all' ,
271+ 'env:test' ,
272+ 'mocha:unit' ,
273+ //'mocha:coverage',
274+ cb ) ;
275+ } ) ;
276+
264277gulp . task ( 'test:server' , ( ) => {
265278 process . env . NODE_ENV = 'test' ;
266279 return gulp . src ( paths . server . test )
@@ -272,6 +285,19 @@ gulp.task('test:server', () => {
272285 } ) ) ;
273286} ) ;
274287
288+ gulp . task ( 'mocha:unit' , ( ) => {
289+ return gulp . src ( paths . server . test )
290+ . pipe ( plugins . mocha ( {
291+ reporter : 'spec' ,
292+ require : [
293+ './mocha.conf'
294+ ]
295+ } ) )
296+ . once ( 'end' , function ( ) {
297+ process . exit ( ) ;
298+ } ) ;
299+ } ) ;
300+
275301gulp . task ( 'test:client' , ( ) => {
276302 let testFiles = _ . union ( paths . client . testRequire , paths . client . test ) ;
277303 return gulp . src ( testFiles )
You can’t perform that action at this time.
0 commit comments