Handle empty handles (#11598)

* Handle empty handles

* Close and dispose window at end of void test

* Dispose of existing window before running void 0 spec
This commit is contained in:
Samuel Attard 2018-02-13 06:46:29 +11:00 committed by shelley vohr
parent 181169b743
commit 9bd7d53cf8
3 changed files with 23 additions and 10 deletions

View file

@ -86,6 +86,16 @@ describe('BrowserWindow module', () => {
return closeWindow(w).then(() => { w = null })
})
describe('BrowserWindow constructor', () => {
it('allows passing void 0 as the webContents', () => {
w.close()
w = null
w = new BrowserWindow({
webContents: void 0
})
})
})
describe('BrowserWindow.close()', () => {
let server