diff --git a/test/fake-timers-test.js b/test/fake-timers-test.js index a838298..42ea8fb 100644 --- a/test/fake-timers-test.js +++ b/test/fake-timers-test.js @@ -3155,7 +3155,7 @@ describe("FakeTimers", function () { }); }); - describe("date", function () { + describe("Date", function () { beforeEach(function () { this.now = new GlobalDate().getTime() - 3000; this.clock = FakeTimers.createClock(this.now); @@ -3182,17 +3182,14 @@ describe("FakeTimers", function () { assert(typeof date === "string"); }); - it.skip("creates real Date objects when Date constructor is gone", function () { + it("creates real Date objects when Date constructor is gone", function () { const realDate = new Date(); Date = NOOP; // eslint-disable-line no-global-assign global.Date = NOOP; const date = new this.clock.Date(); - assert.same( - date.constructor.prototype, - realDate.constructor.prototype, - ); + assert(date instanceof realDate.constructor); }); it("creates Date objects representing clock time", function () { @@ -3300,8 +3297,8 @@ describe("FakeTimers", function () { assert.equals(fakeDateStr, new this.clock.Date().toString()); }); - it.skip("mirrors native Date.prototype", function () { - assert.same(this.clock.Date.prototype, Date.prototype); + it("creates objects that are instances of Date", function () { + assert(new this.clock.Date() instanceof Date); }); it("supports now method if present", function () {