Browse Source

test: retry beforeunload tests up to 3 times (#21293)

Jeremy Apthorp 5 years ago
parent
commit
f09cb114e4
1 changed files with 6 additions and 1 deletions
  1. 6 1
      spec-main/api-browser-window-spec.ts

+ 6 - 1
spec-main/api-browser-window-spec.ts

@@ -2368,7 +2368,12 @@ describe('BrowserWindow module', () => {
     })
   })
 
-  describe('beforeunload handler', () => {
+  describe('beforeunload handler', function () {
+    // TODO(nornagon): I feel like these tests _oughtn't_ be flakey, but
+    // beforeunload is in general not reliable on the web, so i'm not going to
+    // worry about it too much for now.
+    this.retries(3)
+
     let w: BrowserWindow = null as unknown as BrowserWindow
     beforeEach(() => {
       w = new BrowserWindow({ show: false, webPreferences: { nodeIntegration: true } })