Disable jquery fx in specs

This commit is contained in:
Kevin Sawicki
2013-02-13 17:12:22 -08:00
parent fcba61f2d1
commit 1922034df5
2 changed files with 2 additions and 6 deletions

View File

@@ -28,6 +28,7 @@ window.loadTextMatePackages = ->
window.loadTextMatePackages()
beforeEach ->
jQuery.fx.off = true
window.fixturesProject = new Project(require.resolve('fixtures'))
window.resetTimeouts()
atom.atomPackageStates = {}

View File

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