It might be better to mock the Javascript clock, using either [sinon](http://sinonjs.org/docs/#clock) or [Jasmine](http://pivotal.github.io/jasmine/#section-Mocking_the_JavaScript_Clock)