mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Disable jquery fx in specs
This commit is contained in:
@@ -28,6 +28,7 @@ window.loadTextMatePackages = ->
|
||||
window.loadTextMatePackages()
|
||||
|
||||
beforeEach ->
|
||||
jQuery.fx.off = true
|
||||
window.fixturesProject = new Project(require.resolve('fixtures'))
|
||||
window.resetTimeouts()
|
||||
atom.atomPackageStates = {}
|
||||
|
||||
@@ -19,15 +19,10 @@ describe "Gists package", ->
|
||||
[request, originalFxOffValue] = []
|
||||
|
||||
beforeEach ->
|
||||
originalFxOffValue = $.fx.off
|
||||
$.fx.off = true
|
||||
editor.trigger 'gist:create'
|
||||
expect($.ajax).toHaveBeenCalled()
|
||||
request = $.ajax.argsForCall[0][0]
|
||||
|
||||
afterEach ->
|
||||
$.fx.off = originalFxOffValue
|
||||
|
||||
it "creates an Ajax request to api.github.com with the entire buffer contents as the Gist's content", ->
|
||||
expect(request.url).toBe 'https://api.github.com/gists'
|
||||
expect(request.type).toBe 'POST'
|
||||
@@ -46,7 +41,7 @@ describe "Gists package", ->
|
||||
expect(rootView.find('.notification')).toExist()
|
||||
expect(rootView.find('.notification .title').text()).toBe 'Gist 1 created'
|
||||
advanceClock(2000)
|
||||
expect(rootView.find('.gist-notification')).not.toExist()
|
||||
expect(rootView.find('.notification')).not.toExist()
|
||||
|
||||
describe "when the editor has a selection", ->
|
||||
beforeEach ->
|
||||
|
||||
Reference in New Issue
Block a user