Fix test BrowserWindow.addTabbedWindow() (#11795)

* Fix test BrowserWindow.addTabbedWindow()

* Address review comments
This commit is contained in:
Nitish Sakhawalkar 2018-02-02 18:31:02 -08:00 committed by Charles Kerr
parent bd06abd523
commit 62d2a3472f

View file

@ -703,8 +703,7 @@ describe('BrowserWindow module', () => {
})
})
// FIXME(alexeykuzmin): Fails on Mac.
xdescribe('BrowserWindow.addTabbedWindow()', () => {
describe('BrowserWindow.addTabbedWindow()', () => {
before(function () {
if (process.platform !== 'darwin') {
this.skip()
@ -716,7 +715,13 @@ describe('BrowserWindow module', () => {
assert.doesNotThrow(() => {
w.addTabbedWindow(tabbedWindow)
})
closeWindow(tabbedWindow).then(done)
assert.equal(BrowserWindow.getAllWindows().length, 3) // Test window + w + tabbedWindow
closeWindow(tabbedWindow, {assertSingleWindow: false}).then(() => {
assert.equal(BrowserWindow.getAllWindows().length, 2) // Test window + w
done()
})
})
})