diff --git a/spec-main/api-browser-window-spec.ts b/spec-main/api-browser-window-spec.ts index 8dd2b186011..0335e1d0131 100644 --- a/spec-main/api-browser-window-spec.ts +++ b/spec-main/api-browser-window-spec.ts @@ -606,8 +606,10 @@ describe('BrowserWindow module', () => { const otherWindow = new BrowserWindow({ show: false, title: 'otherWindow' }) const otherWindowShown = emittedOnce(otherWindow, 'show') + const otherWindowFocused = emittedOnce(otherWindow, 'focus') otherWindow.show() await otherWindowShown + await otherWindowFocused expect(otherWindow.isFocused()).to.equal(true) w.moveTop()