Don’t use jQuery to attach window listeners in spec-helper

This prevents the command palette spec from failing because it’s
explicitly asserting that no listener registered on the window without
a description should show up in the palette, but core:close is also
registered on the workspace.
This commit is contained in:
Nathan Sobo
2014-09-25 20:57:09 -06:00
parent 06e0919597
commit 5a72d12026

View File

@@ -29,8 +29,8 @@ atom.keymaps.loadBundledKeymaps()
keyBindingsToRestore = atom.keymaps.getKeyBindings()
commandsToRestore = atom.commands.getSnapshot()
$(window).on 'core:close', -> window.close()
$(window).on 'beforeunload', ->
window.addEventListener 'core:close', -> window.close()
window.addEventListener 'beforeunload', ->
atom.storeWindowDimensions()
atom.saveSync()
$('html,body').css('overflow', 'auto')