Compare commits

..

2 Commits

Author SHA1 Message Date
Gregg Van Hove
70bce55721 Bump version to 2.9.1 2018-01-19 17:51:18 -08:00
Gregg Van Hove
53529bdc9a Clear timeouts when starting to process a milli instead of at the end
- Fixes #1482
2018-01-19 17:47:28 -08:00
6 changed files with 36 additions and 5 deletions

View File

@@ -2193,6 +2193,7 @@ getJasmineRequireObj().DelayedFunctionScheduler = function(j$) {
}
do {
deletedKeys = [];
var newCurrentTime = scheduledLookup.shift();
tickDate(newCurrentTime - currentTime);
@@ -2215,7 +2216,6 @@ getJasmineRequireObj().DelayedFunctionScheduler = function(j$) {
}
funcToRun.funcToCall.apply(null, funcToRun.params || []);
});
deletedKeys = [];
} while (scheduledLookup.length > 0 &&
// checking first if we're out of time prevents setTimeout(0)
// scheduled in a funcToRun from forcing an extra iteration
@@ -5538,5 +5538,5 @@ getJasmineRequireObj().UserContext = function(j$) {
};
getJasmineRequireObj().version = function() {
return '2.9.0';
return '2.9.1';
};

View File

@@ -4,6 +4,6 @@
#
module Jasmine
module Core
VERSION = "2.9.0"
VERSION = "2.9.1"
end
end

View File

@@ -1,7 +1,7 @@
{
"name": "jasmine-core",
"license": "MIT",
"version": "2.9.0",
"version": "2.9.1",
"repository": {
"type": "git",
"url": "https://github.com/jasmine/jasmine.git"

15
release_notes/2.9.1.md Normal file
View File

@@ -0,0 +1,15 @@
# Jasmine Core 2.9.1 Release Notes
## Summary
This is a hotfix release to fix a breaking change from the 2.9.0 release
## Changes
* Clear timeouts when starting to process a milli instead of at the end
- Fixes #1482
------
_Release Notes generated with _[Anchorman](http://github.com/infews/anchorman)_

View File

@@ -254,6 +254,22 @@ describe("DelayedFunctionScheduler", function() {
expect(fn.calls.count()).toBe(1);
});
it("does not remove a function that hasn't been added yet", function() {
var scheduler = new jasmineUnderTest.DelayedFunctionScheduler(),
fn = jasmine.createSpy('fn'),
fnDelay = 10,
timeoutKey;
scheduler.removeFunctionWithId('foo');
scheduler.scheduleFunction(fn, fnDelay, [], false, 'foo');
expect(fn).not.toHaveBeenCalled();
scheduler.tick(fnDelay + 1);
expect(fn).toHaveBeenCalled();
});
it("updates the mockDate per scheduled time", function () {
var scheduler = new jasmineUnderTest.DelayedFunctionScheduler(),
tickDate = jasmine.createSpy('tickDate');

View File

@@ -124,6 +124,7 @@ getJasmineRequireObj().DelayedFunctionScheduler = function(j$) {
}
do {
deletedKeys = [];
var newCurrentTime = scheduledLookup.shift();
tickDate(newCurrentTime - currentTime);
@@ -146,7 +147,6 @@ getJasmineRequireObj().DelayedFunctionScheduler = function(j$) {
}
funcToRun.funcToCall.apply(null, funcToRun.params || []);
});
deletedKeys = [];
} while (scheduledLookup.length > 0 &&
// checking first if we're out of time prevents setTimeout(0)
// scheduled in a funcToRun from forcing an extra iteration