From 4fc59bcbef95b2b39cf286fdfea8f6c6106bc125 Mon Sep 17 00:00:00 2001 From: David Sanders Date: Thu, 6 Apr 2023 02:52:18 -0700 Subject: [PATCH] test: remove workaround for fixed Menu.closePopup issue (#37846) test: remove workaround for fixed Menu.closePopup issue (#37802) --- spec/api-menu-spec.ts | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/spec/api-menu-spec.ts b/spec/api-menu-spec.ts index 5c47ee01f75a4..f3093a2800ff6 100644 --- a/spec/api-menu-spec.ts +++ b/spec/api-menu-spec.ts @@ -816,10 +816,7 @@ describe('Menu module', function () { it('should emit menu-will-close event', (done) => { menu.on('menu-will-close', () => { done(); }); menu.popup({ window: w }); - // https://github.com/electron/electron/issues/19411 - setTimeout(() => { - menu.closePopup(); - }); + menu.closePopup(); }); it('returns immediately', () => { @@ -848,18 +845,12 @@ describe('Menu module', function () { expect(x).to.equal(100); expect(y).to.equal(101); - // https://github.com/electron/electron/issues/19411 - setTimeout(() => { - menu.closePopup(); - }); + menu.closePopup(); }); it('works with a given BrowserWindow, no options, and a callback', (done) => { menu.popup({ window: w, callback: () => done() }); - // https://github.com/electron/electron/issues/19411 - setTimeout(() => { - menu.closePopup(); - }); + menu.closePopup(); }); it('prevents menu from getting garbage-collected when popuping', async () => {