when jasmine clock is installed and date is mocked new Date() instanceof Date should equal true
This commit is contained in:
@@ -417,6 +417,8 @@ describe("Clock (acceptance)", function() {
|
||||
|
||||
clock.install().mockDate();
|
||||
|
||||
expect(new global.Date() instanceof global.Date).toBe(true);
|
||||
|
||||
var now = new global.Date().getTime();
|
||||
|
||||
clock.tick(50);
|
||||
@@ -443,6 +445,8 @@ describe("Clock (acceptance)", function() {
|
||||
|
||||
clock.install().mockDate(baseTime);
|
||||
|
||||
expect(new global.Date() instanceof global.Date).toBe(true);
|
||||
|
||||
var now = new global.Date().getTime();
|
||||
|
||||
expect(now).toEqual(baseTime.getTime());
|
||||
|
||||
@@ -61,6 +61,7 @@ getJasmineRequireObj().MockDate = function() {
|
||||
}
|
||||
|
||||
function createDateProperties() {
|
||||
FakeDate.prototype = GlobalDate.prototype;
|
||||
|
||||
FakeDate.now = function() {
|
||||
if (GlobalDate.now) {
|
||||
|
||||
Reference in New Issue
Block a user