mirror of
https://github.com/atom/atom.git
synced 2026-01-22 21:38:10 -05:00
Spy on setInterval explicitly when needed in EditorComponent spec
This commit is contained in:
@@ -9,6 +9,9 @@ describe "EditorComponent", ->
|
||||
atom.packages.activatePackage('language-javascript')
|
||||
|
||||
runs ->
|
||||
spyOn(window, "setInterval").andCallFake window.fakeSetInterval
|
||||
spyOn(window, "clearInterval").andCallFake window.fakeClearInterval
|
||||
|
||||
delayAnimationFrames = false
|
||||
nextAnimationFrame = null
|
||||
spyOn(window, 'requestAnimationFrame').andCallFake (fn) ->
|
||||
|
||||
@@ -93,8 +93,6 @@ beforeEach ->
|
||||
spyOn(WorkspaceView.prototype, 'setTitle').andCallFake (@title) ->
|
||||
spyOn(window, "setTimeout").andCallFake window.fakeSetTimeout
|
||||
spyOn(window, "clearTimeout").andCallFake window.fakeClearTimeout
|
||||
spyOn(window, "setInterval").andCallFake window.fakeSetInterval
|
||||
spyOn(window, "clearInterval").andCallFake window.fakeClearInterval
|
||||
spyOn(pathwatcher.File.prototype, "detectResurrectionAfterDelay").andCallFake -> @detectResurrection()
|
||||
spyOn(Editor.prototype, "shouldPromptToSave").andReturn false
|
||||
|
||||
|
||||
Reference in New Issue
Block a user