Remove unneeded nextTick and assert array

This commit is contained in:
Kevin Sawicki 2017-01-10 15:46:58 -08:00
parent 8f63fdb278
commit 8098ca3b66

View file

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