Revert performance optimization of using setTimeout in SpecRunner every 10 steps. Breaks loading partials

This commit is contained in:
Elliott Sprehn 2010-10-27 13:41:31 -07:00
parent ee8465bf10
commit 2da1de5a6d

View file

@ -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);