Correctly handle functions that are scheduled after the clock is uninstalled and reinstalled from within Clock#tick.

Fixes #790.
This commit is contained in:
Steve Gravrock
2015-03-02 21:45:12 -08:00
parent abc0c4a97e
commit 2af9a45fb2
5 changed files with 52 additions and 75 deletions

View File

@@ -11,7 +11,7 @@ getJasmineRequireObj().Env = function(j$) {
var realSetTimeout = j$.getGlobal().setTimeout;
var realClearTimeout = j$.getGlobal().clearTimeout;
this.clock = new j$.Clock(global, new j$.DelayedFunctionScheduler(), new j$.MockDate(global));
this.clock = new j$.Clock(global, function () { return new j$.DelayedFunctionScheduler(); }, new j$.MockDate(global));
var runnableLookupTable = {};
var runnableResources = {};