chore(build): gulp test.unit.cjs broken the second run

Fixes #1311

Closes #1333
This commit is contained in:
Marc Laval 2015-04-13 18:59:37 +02:00 committed by Misko Hevery
parent 28ba179e31
commit ff6e7754ae
1 changed files with 2 additions and 0 deletions

View File

@ -706,6 +706,7 @@ gulp.task('test.unit.cjs/ci', function () {
gulp.task('test.unit.cjs', ['build.js.cjs'], function () {
//Run tests once
runSequence('test.unit.cjs/ci', function() {});
//Watcher to transpile file changed
gulp.watch(CONFIG.transpile.src.js.concat(['modules/**/*.cjs']), function(event) {
var relPath = path.relative(__dirname, event.path).replace(/\\/g, "/");
@ -723,6 +724,7 @@ gulp.task('test.unit.cjs', ['build.js.cjs'], function () {
delete require.cache[id];
}
}
global.assert = undefined; // https://github.com/angular/angular/issues/1340
runSequence('test.unit.cjs/ci', function() {});
});