fix(build): EMFILE error on Windows when executing JS unit tests
Fixes #4525 Closes #4796
This commit is contained in:
parent
fa44da16c8
commit
1dc8a0a95d
14
gulpfile.js
14
gulpfile.js
|
@ -489,7 +489,7 @@ gulp.task('test.unit.js', ['build.js.dev'], function (done) {
|
||||||
runSequence(
|
runSequence(
|
||||||
'!test.unit.js/karma-server',
|
'!test.unit.js/karma-server',
|
||||||
function() {
|
function() {
|
||||||
watch('modules/**', [
|
watch('modules/**', { ignoreInitial: true }, [
|
||||||
'!broccoli.js.dev',
|
'!broccoli.js.dev',
|
||||||
'!test.unit.js/karma-run'
|
'!test.unit.js/karma-run'
|
||||||
]);
|
]);
|
||||||
|
@ -517,8 +517,16 @@ gulp.task('test.unit.js.sauce', ['build.js.dev'], function (done) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('!test.unit.js/karma-server', function() {
|
gulp.task('!test.unit.js/karma-server', function(done) {
|
||||||
new karma.Server({configFile: __dirname + '/karma-js.conf.js', reporters: 'dots'}).start();
|
var watchStarted = false;
|
||||||
|
var server = new karma.Server({configFile: __dirname + '/karma-js.conf.js', reporters: 'dots'});
|
||||||
|
server.on('run_complete', function () {
|
||||||
|
if (!watchStarted) {
|
||||||
|
watchStarted = true;
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
server.start();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue