👷 Let’s test the undefined case, too

This commit is contained in:
Felix Rieseberg 2017-11-22 14:38:08 -08:00
parent 14db204315
commit b7bc4eb586

View file

@ -818,6 +818,10 @@ describe('BrowserWindow module', () => {
it('returns the window with the browserView', () => {
assert.equal(BrowserWindow.fromBrowserView(bv).id, w.id)
})
it('returns undefined if not attached', () => {
w.setBrowserView(null)
assert.equal(BrowserWindow.fromBrowserView(bv), undefined)
})
})