uberVU / mozaic

JS Framework for building SPA
http://ubervu.github.com/mozaic/
26 stars 17 forks source link

replace setInterval with setTimeout in datasource.coffee #56

Closed valentinzberea closed 11 years ago

valentinzberea commented 11 years ago

Right now the expired collections are collected every 10 seconds by checkForUnusedCollections method:

setInterval(@checkForUnusedCollections, @checkIntervalForUnusedCollections)

In order to make tests run faster I would like to be able to override checkIntervalForUnusedCollections property. This would be achieved by replacing setInterval with setTimeout and schedule another callback at the end of checkForUnusedCollections method.

@uberVU/mozaic-core-commiters

aismail commented 11 years ago

You can make time pass faster with Sinon :) It has a "fast forward" feature.