Gulp karma "spawn ENAMETOOLONG" when processing many files

We use the gulp -karma plugin for gulp for our testing and PhantomJS. We work on Windows, and PhantomJS is a .exe file. Our files, which have tests, have grown, and now we get the "spawn ENAMETOOLONG" error. From what I compiled from this answer: https://github.com/dbushell/grunt-svg2png/issues/17 for Grunt - the problem is that the sendt parameters for PhantomJS are too large. Has anyone had a problem with simlar or know any work around it (except to combine test files into fewer files)?

Error message:

[14:20:19] Starting Karma server...

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: spawn ENAMETOOLONG
    at errnoException (child_process.js:1001:11)
    at Process.ChildProcess._handle.onexit (child_process.js:792:34)
+4
1

gulp.src()

    var files =[
      'lib/**/*.js',
      'src/**/*.js',
      'test/**/*.js'
    ],
    gulp.task('unit.test', function() {
      return gulp.src([])
        .pipe(karma({
          configFile: 'my.karma.conf.js',
          files : files,
          action: 'run'
        }))
        .on('error', function(err) {
          throw err;
        });
    });

+5

All Articles