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');