Merge branch 'idConflict' of https://github.com/atscott/jasmine
* Avoid generating timers with IDs that conflict with native * Fixes #2068 * Merges #2069 from @atscott
This commit is contained in:
@@ -6,7 +6,7 @@ getJasmineRequireObj().DelayedFunctionScheduler = function(j$) {
|
||||
this.scheduledLookup_ = [];
|
||||
this.scheduledFunctions_ = {};
|
||||
this.currentTime_ = 0;
|
||||
this.delayedFnCount_ = 0;
|
||||
this.delayedFnStartCount_ = 1e12; // arbitrarily large number to avoid collisions with native timer IDs;
|
||||
this.deletedKeys_ = [];
|
||||
|
||||
this.tick = function(millis, tickDate) {
|
||||
@@ -38,7 +38,7 @@ getJasmineRequireObj().DelayedFunctionScheduler = function(j$) {
|
||||
}
|
||||
|
||||
millis = millis || 0;
|
||||
timeoutKey = timeoutKey || ++this.delayedFnCount_;
|
||||
timeoutKey = timeoutKey || ++this.delayedFnStartCount_;
|
||||
runAtMillis = runAtMillis || this.currentTime_ + millis;
|
||||
|
||||
const funcToSchedule = {
|
||||
|
||||
Reference in New Issue
Block a user