test: retry for a few flaky tests (#21658)

This commit is contained in:
Cheng Zhao 2020-01-10 04:50:30 +09:00 committed by Jeremy Apthorp
parent cfae97a64c
commit 8a92b65fd3
2 changed files with 10 additions and 1 deletions

View file

@ -20,6 +20,10 @@ ifdescribe(process.platform !== 'linux')('document.visibilityState', () => {
const itWithOptions = (name: string, options: BrowserWindowConstructorOptions, fn: Mocha.Func) => {
return it(name, async function (...args) {
// document.visibilityState tests are very flaky, this is probably because
// Electron implements it via async IPC messages.
this.retries(3)
w = new BrowserWindow({
...options,
paintWhenInitiallyHidden: false,