From 4254825f3cc6fdcf3ed9d6ee491d56523d89ef40 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Thu, 27 Jul 2017 08:44:56 -0700 Subject: [PATCH] Remove duplicate mocking Since this was newly introduced, let's only set it up when clock mocking is specifically requested to minimize breakage. We really need to deprecate the global spec helper someday. It's bad news. /cc @hansonw --- spec/spec-helper.coffee | 2 -- 1 file changed, 2 deletions(-) diff --git a/spec/spec-helper.coffee b/spec/spec-helper.coffee index 2379cc650..6ac492995 100644 --- a/spec/spec-helper.coffee +++ b/spec/spec-helper.coffee @@ -64,7 +64,6 @@ beforeEach -> atom.project.setPaths([specProjectPath]) window.resetTimeouts() - spyOn(Date, 'now').andCallFake -> window.now spyOn(_._, "now").andCallFake -> window.now spyOn(window, "setTimeout").andCallFake window.fakeSetTimeout spyOn(window, "clearTimeout").andCallFake window.fakeClearTimeout @@ -180,7 +179,6 @@ jasmine.useRealClock = -> jasmine.unspy(window, 'setTimeout') jasmine.unspy(window, 'clearTimeout') jasmine.unspy(_._, 'now') - jasmine.unspy(Date, 'now') # The clock is halfway mocked now in a sad and terrible way... only setTimeout # and clearTimeout are included. This method will also include setInterval. We