diff --git a/spec/atom-spec.coffee b/spec/atom-spec.coffee index 7fb26f102..b73095805 100644 --- a/spec/atom-spec.coffee +++ b/spec/atom-spec.coffee @@ -8,6 +8,13 @@ temp = require "temp" describe "the `atom` global", -> describe 'window sizing methods', -> describe '::getPosition and ::setPosition', -> + originalPosition = null + beforeEach -> + originalPosition = atom.getPosition() + + afterEach -> + atom.setPosition(originalPosition.x, originalPosition.y) + it 'sets the position of the window, and can retrieve the position just set', -> atom.setPosition(22, 45) expect(atom.getPosition()).toEqual x: 22, y: 45 diff --git a/spec/spec-helper.coffee b/spec/spec-helper.coffee index fb326caf8..36b4e2a40 100644 --- a/spec/spec-helper.coffee +++ b/spec/spec-helper.coffee @@ -1,5 +1,4 @@ require '../src/window' -atom.restoreWindowDimensions() require 'jasmine-json' require '../vendor/jasmine-jquery' @@ -31,9 +30,6 @@ commandsToRestore = atom.commands.getSnapshot() styleElementsToRestore = atom.styles.getSnapshot() window.addEventListener 'core:close', -> window.close() -window.addEventListener 'beforeunload', -> - atom.storeWindowDimensions() - atom.saveSync() document.querySelector('html').style.overflow = 'auto' document.body.style.overflow = 'auto'