Skip to content


Default value for setTimeout/setInterval delay param #324

wants to merge 1 commit into from

2 participants


When delay param isn't passed, jasmine.Clock not works properly


This code has changed - there is now a DelayedFunctionScheduler that takes millis and now defaults to 0 for all calls to timer functions. So if you try master, this bug is fixed.

Thanks for noticing this and helping to make Jasmine better.


@infews infews closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 28, 2013
  1. @dmitriykharchenko
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/jasmine-core/jasmine.js
1 lib/jasmine-core/jasmine.js
@@ -1652,6 +1652,7 @@ jasmine.FakeTimer.prototype.runFunctionsWithinRange = function(oldMillis, nowMil
jasmine.FakeTimer.prototype.scheduleFunction = function(timeoutKey, funcToCall, millis, recurring) {
+ millis = millis || 10
this.scheduledFunctions[timeoutKey] = {
runAtMillis: this.nowMillis + millis,
funcToCall: funcToCall,
Something went wrong with that request. Please try again.