Throw if the argument to jasmine.clock().mockDate() is not a Date
This commit is contained in:
@@ -17,10 +17,9 @@ getJasmineRequireObj().MockDate = function(j$) {
|
||||
currentTime = mockDate.getTime();
|
||||
} else {
|
||||
if (!j$.util.isUndefined(mockDate)) {
|
||||
j$.getEnv().deprecated(
|
||||
throw new Error(
|
||||
'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.'
|
||||
'should be a Date instance.'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user