Merge branch '3.99' into 4.0
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
getJasmineRequireObj().MockDate = function() {
|
||||
getJasmineRequireObj().MockDate = function(j$) {
|
||||
function MockDate(global) {
|
||||
var self = this;
|
||||
var currentTime = 0;
|
||||
@@ -16,6 +16,14 @@ getJasmineRequireObj().MockDate = function() {
|
||||
if (mockDate instanceof GlobalDate) {
|
||||
currentTime = mockDate.getTime();
|
||||
} else {
|
||||
if (!j$.util.isUndefined(mockDate)) {
|
||||
j$.getEnv().deprecated(
|
||||
'The argument to jasmine.clock().mockDate(), if specified, ' +
|
||||
'should be a Date instance. Passing anything other than a Date ' +
|
||||
'will be treated as an error in a future release.'
|
||||
);
|
||||
}
|
||||
|
||||
currentTime = new GlobalDate().getTime();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user