]> khamidou — GitHub mirrors - electron.git/commitdiff
Fix running spec on Windows
authorCheng Zhao <zcbenz@gmail.com>
Thu, 28 May 2015 05:45:16 +0000 (13:45 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Thu, 28 May 2015 06:43:16 +0000 (14:43 +0800)
spec/api-browser-window-spec.coffee

index fb5c26abc457dab88a98dc63e08b1a55af301db7..ea3e06c9d4061c2566ff3ddefaac5931546650da 100644 (file)
@@ -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]