npm脚本中&&后面的命令没有运行

这是我正在运行的npm脚本 (当然是在我的package.json中定义的):

"scripts": { "test": "gulp && mocha-casperjs test/features/specs/*-spec.js" } 

出于某种原因,我所有的吞咽任务运行良好,但我的摩卡testing永远不会运行。 所以当我完全完成了一大堆的时候,我看到的是这样的:

 $ npm test > someApp@0.0.0 test /Users/me/code/projects/we-do-tdd > gulp && mocha-casperjs test/features/specs/*-spec.js [17:34:50] Using gulpfile ~/code/projects/someApp/gulpfile.js [17:34:50] Starting 'default'... [17:34:50] Starting 'bundleApp'... [17:34:50] Finished 'bundleApp' after 17 ms [17:34:50] Starting 'watch'... [17:34:50] Finished 'watch' after 7.33 ms [17:34:50] Starting 'startApp'... [17:34:50] Finished 'startApp' after 6.63 ms [17:34:50] Finished 'default' after 34 ms 

gulpfile

 "use strict"; var app = require('./server'), gulp = require('gulp'), runSequence = require('run-sequence'), browserify = require('browserify'), source = require('vinyl-source-stream'), gutil = require('gulp-util'), babelify = require('babelify'); var scriptsCount = 0; gulp.task('default', function (cb){ runSequence(['bundleApp','watch'], ['startApp'], cb) }); gulp.task('watch', function () { gulp.watch(['./src/*.js'], ['scripts']); }); gulp.task('startApp', function (cb) { app.listen(3000, cb).on('error', function(err) { console.log(err); });; }); gulp.task('bundleApp', function () { bundleApp(false); }); function bundleApp() { scriptsCount++; var appBundler = browserify({ entries: './src/components/app.js', debug: true }) appBundler .transform("babelify", {presets: ["es2015", "react"]}) .bundle() .on('error', gutil.log) .pipe(source('bundle.js')) .pipe(gulp.dest('./build/app/js')); } 

       

网上收集的解决方案 "npm脚本中&&后面的命令没有运行"