Remove unneeded nextTick and assert array
authorKevin Sawicki <kevinsawicki@gmail.com>
Tue, 10 Jan 2017 23:46:58 +0000 (15:46 -0800)
committerKevin Sawicki <kevinsawicki@gmail.com>
Thu, 12 Jan 2017 18:28:08 +0000 (10:28 -0800)
spec/api-browser-window-spec.js

index 9f45492dcd181aeda96d3fa703f5325fe270c0a4..aa98bc0f7377d8326bb7e44346e6ad4b490199ac 100644 (file)
@@ -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'))
       })