mirror of
https://github.com/atom/atom.git
synced 2026-01-25 14:59:03 -05:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user