diff --git a/spec-main/api-browser-window-spec.ts b/spec-main/api-browser-window-spec.ts index 0a1863abf0d0..cec65e092c03 100644 --- a/spec-main/api-browser-window-spec.ts +++ b/spec-main/api-browser-window-spec.ts @@ -4211,8 +4211,10 @@ describe('BrowserWindow module', () => { await enterFullScreen; expect(w.isFullScreen()).to.be.true('isFullScreen'); await delay(); - const w2 = new BrowserWindow(); - await delay(); + const w2 = new BrowserWindow({ show: false }); + const enterFullScreen2 = emittedOnce(w2, 'enter-full-screen'); + w2.show(); + await enterFullScreen2; expect(w2.isFullScreen()).to.be.true('isFullScreen'); }); });