Add failing spec for app.exit with >2 windows

This commit is contained in:
Kevin Sawicki 2017-04-06 15:02:32 -07:00
parent a30cf30e93
commit bfb9388191
3 changed files with 33 additions and 0 deletions

View file

@ -0,0 +1,19 @@
const {app, BrowserWindow} = require('electron')
const windows = []
function createWindow (id) {
const window = new BrowserWindow({show: false})
window.loadURL(`data:,window${id}`)
windows.push(window)
}
app.once('ready', () => {
for (let i = 1; i <= 5; i++) {
createWindow(i)
}
setImmediate(function () {
app.exit(123)
})
})