diff --git a/test/unit/electron/index.js b/test/unit/electron/index.js index 1a3c9ae18f27e..10678564d5c19 100644 --- a/test/unit/electron/index.js +++ b/test/unit/electron/index.js @@ -63,6 +63,8 @@ const args = minimist(process.argv.slice(2), { } }); +const isCI = !!process.env.BUILD_ARTIFACTSTAGINGDIRECTORY || !!process.env.GITHUB_WORKSPACE; + if (args.help) { console.log(`Usage: node ${process.argv[1]} [options] [file...] @@ -331,11 +333,17 @@ app.on('ready', () => { additionalArguments: [`--vscode-window-config=vscode:test-vscode-window-config`], nodeIntegration: true, contextIsolation: false, + backgroundThrottling: false, enableWebSQL: false, spellcheck: false } }); + if (isCI) { + // Hidden windows throttle requestAnimationFrame on Windows even when background throttling is disabled. + win.showInactive(); + } + win.webContents.on('did-finish-load', () => { if (args.dev) { win.show();