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
This commit is contained in:
Nathan Sobo
2017-07-27 08:44:56 -07:00
parent a38b438338
commit 4254825f3c

View File

@@ -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