uberVU / mozaic

JS Framework for building SPA

Home Page:http://ubervu.github.com/mozaic/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

replace setInterval with setTimeout in datasource.coffee

valentinzberea opened this issue · comments

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

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