From 01579cc8ed2ed9c8f9fbdb028967a912d0292778 Mon Sep 17 00:00:00 2001 From: Jeremy Apthorp Date: Mon, 18 May 2020 19:06:19 -0700 Subject: [PATCH] test: add retries to another beforeunload test (#23644) --- spec-main/api-browser-window-spec.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spec-main/api-browser-window-spec.ts b/spec-main/api-browser-window-spec.ts index 8342c337ee20..51bb45921012 100644 --- a/spec-main/api-browser-window-spec.ts +++ b/spec-main/api-browser-window-spec.ts @@ -185,7 +185,9 @@ describe('BrowserWindow module', () => { fs.unlinkSync(test); expect(content).to.equal('close'); }); - it('should emit beforeunload event', async () => { + it('should emit beforeunload event', async function () { + // TODO(nornagon): deflake this test. + this.retries(3); await w.loadFile(path.join(__dirname, 'fixtures', 'api', 'close-beforeunload-false.html')); w.webContents.executeJavaScript('run()', true); const [e] = await emittedOnce(ipcMain, 'onbeforeunload');