From b7bc4eb5864e26c3f1124addc35222bafefc0973 Mon Sep 17 00:00:00 2001 From: Felix Rieseberg Date: Wed, 22 Nov 2017 14:38:08 -0800 Subject: [PATCH] =?UTF-8?q?:construction=5Fworker:=20Let=E2=80=99s=20test?= =?UTF-8?q?=20the=20undefined=20case,=20too?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spec/api-browser-window-spec.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spec/api-browser-window-spec.js b/spec/api-browser-window-spec.js index 61561401c8b..2adc82df05d 100644 --- a/spec/api-browser-window-spec.js +++ b/spec/api-browser-window-spec.js @@ -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) }) })