Call removeWindow() explicitly to simulate a window close

This commit is contained in:
Ash Wilson
2019-04-19 12:55:03 -04:00
parent b9268c703c
commit e8cc4aa421

View File

@@ -725,13 +725,13 @@ describe('AtomApplication', function () {
if (process.platform === 'linux' || process.platform === 'win32') {
it('quits the application', async function () {
const [w] = await scenario.launch(parseCommandLine(['a']))
w.browserWindow.emit('closed')
scenario.getApplication(0).removeWindow(w)
assert.isTrue(electron.app.quit.called)
})
} else if (process.platform === 'darwin') {
it('leaves the application open', async function () {
const [w] = await scenario.launch(parseCommandLine(['a']))
w.browserWindow.emit('closed')
scenario.getApplication(0).removeWindow(w)
assert.isFalse(electron.app.quit.called)
})
}