不要怂,就是干,撸起袖子干!

Commit 6d1bd3fc by sdepold

only delay execution of custom event emitter for 1ms instead of 5 => 9s differen…

…ce when executing the specs
1 parent bac9b343
Showing with 4 additions and 2 deletions
...@@ -13,12 +13,14 @@ module.exports = (function() { ...@@ -13,12 +13,14 @@ module.exports = (function() {
// delay the function call and return the emitter // delay the function call and return the emitter
setTimeout(function(){ setTimeout(function(){
self.fct.call(self, self) self.fct.call(self, self)
}, 5) }, 1)
return this return this
} }
CustomEventEmitter.prototype.success = CustomEventEmitter.prototype.ok = function(fct) { CustomEventEmitter.prototype.success =
CustomEventEmitter.prototype.ok =
function(fct) {
this.on('success', fct) this.on('success', fct)
return this return this
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!