Skip to content

Commit

Permalink
fix(build): EMFILE error on Windows when executing JS unit tests
Browse files Browse the repository at this point in the history
Fixes #4525
  • Loading branch information
marclaval committed Oct 16, 2015
1 parent c3ab20c commit 790cdcc
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions gulpfile.js
Expand Up @@ -500,15 +500,18 @@ function getBrowsersFromCLI() {
}

gulp.task('test.unit.js', ['build.js.dev'], function (done) {
runSequence(
'!test.unit.js/karma-server',
function() {
watch('modules/**', [
var watchStarted = false;
var server = new karma.Server({configFile: __dirname + '/karma-js.conf.js', reporters: 'dots'}, done);
server.on('run_complete', function () {
if (!watchStarted) {
watchStarted = true;
watch('modules/**', { ignoreInitial: true }, [
'!broccoli.js.dev',
'!test.unit.js/karma-run'
]);
}
);
});
server.start();
});

gulp.task('watch.js.dev', ['build.js.dev'], function (done) {
Expand All @@ -531,11 +534,6 @@ gulp.task('test.unit.js.sauce', ['build.js.dev'], function (done) {
}
});

gulp.task('!test.unit.js/karma-server', function() {
new karma.Server({configFile: __dirname + '/karma-js.conf.js', reporters: 'dots'}).start();
});


gulp.task('!test.unit.js/karma-run', function(done) {
// run the run command in a new process to avoid duplicate logging by both server and runner from
// a single process
Expand Down

0 comments on commit 790cdcc

Please sign in to comment.