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

This commit is contained in:
Jeremy Apthorp 2019-11-27 09:42:54 -08:00 committed by GitHub
parent 06e349d074
commit f09cb114e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 } })