From ebbb974aca1771d4b519bba354239c2005683e03 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Thu, 28 May 2015 13:45:16 +0800 Subject: [PATCH] Fix running spec on Windows --- spec/api-browser-window-spec.coffee | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/api-browser-window-spec.coffee b/spec/api-browser-window-spec.coffee index fb5c26a..ea3e06c 100644 --- a/spec/api-browser-window-spec.coffee +++ b/spec/api-browser-window-spec.coffee @@ -91,8 +91,8 @@ describe 'browser-window module', -> describe 'BrowserWindow.setSize(width, height)', -> it 'sets the window size', (done) -> - size = [20, 400] - w.on 'resize', -> + size = [300, 400] + w.once 'resize', -> newSize = w.getSize() assert.equal newSize[0], size[0] assert.equal newSize[1], size[1] @@ -102,7 +102,7 @@ describe 'browser-window module', -> describe 'BrowserWindow.setPosition(x, y)', -> it 'sets the window position', (done) -> pos = [10, 10] - w.on 'move', -> + w.once 'move', -> newPos = w.getPosition() assert.equal newPos[0], pos[0] assert.equal newPos[1], pos[1] -- 2.7.4