Browse Source

Remove unneeded nextTick and assert array

Kevin Sawicki 8 years ago
parent
commit
8098ca3b66
1 changed files with 2 additions and 4 deletions
  1. 2 4
      spec/api-browser-window-spec.js

+ 2 - 4
spec/api-browser-window-spec.js

@@ -1024,10 +1024,8 @@ describe('BrowserWindow module', function () {
         const initialWebContents = webContents.getAllWebContents()
         ipcRenderer.send('prevent-next-new-window', w.webContents.id)
         w.webContents.once('new-window', () => {
-          process.nextTick(() => {
-            assert.deepEqual(webContents.getAllWebContents().length, initialWebContents.length)
-            done()
-          })
+          assert.deepEqual(webContents.getAllWebContents(), initialWebContents)
+          done()
         })
         w.loadURL('file://' + path.join(fixtures, 'pages', 'window-open.html'))
       })