mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-24 13:53:43 +00:00
Revert performance optimization of using setTimeout in SpecRunner every 10 steps. Breaks loading partials
This commit is contained in:
parent
ee8465bf10
commit
2da1de5a6d
1 changed files with 1 additions and 6 deletions
|
|
@ -21,7 +21,6 @@ angular.scenario.SpecRunner = function() {
|
||||||
*/
|
*/
|
||||||
angular.scenario.SpecRunner.prototype.run = function(spec, specDone) {
|
angular.scenario.SpecRunner.prototype.run = function(spec, specDone) {
|
||||||
var self = this;
|
var self = this;
|
||||||
var count = 0;
|
|
||||||
this.spec = spec;
|
this.spec = spec;
|
||||||
|
|
||||||
this.emit('SpecBegin', spec);
|
this.emit('SpecBegin', spec);
|
||||||
|
|
@ -59,11 +58,7 @@ angular.scenario.SpecRunner.prototype.run = function(spec, specDone) {
|
||||||
return handleError(error, futureDone);
|
return handleError(error, futureDone);
|
||||||
}
|
}
|
||||||
self.emit('StepEnd', spec, future);
|
self.emit('StepEnd', spec, future);
|
||||||
if ((count++) % 10 === 0) {
|
self.$window.setTimeout(function() { futureDone(); }, 0);
|
||||||
self.$window.setTimeout(function() { futureDone(); }, 0);
|
|
||||||
} else {
|
|
||||||
futureDone();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
self.emit('StepError', spec, future, e);
|
self.emit('StepError', spec, future, e);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue