Skip to content
This repository has been archived by the owner on Sep 1, 2021. It is now read-only.

app.allowRendererProcessReuse is deprecated #56

Open
unional opened this issue Feb 16, 2020 · 2 comments
Open

app.allowRendererProcessReuse is deprecated #56

unional opened this issue Feb 16, 2020 · 2 comments

Comments

@unional
Copy link

unional commented Feb 16, 2020

When running electron tests, it prints out the following warning:

(electron) The default value of app.allowRendererProcessReuse is deprecated, it is currently "false". It will change to be "true" in Electron 9. For more information please check electron/electron#18397

@dschuessler
Copy link

This also breaks the layout of the test result reporting considerably.

@rajivshah3
Copy link
Contributor

This can be silenced by using patch-package to add these lines:

In @jest-runner/electron/src/electron_process_injected_code.js:

app.commandLine.appendSwitch('high-dpi-support', 1);
app.commandLine.appendSwitch('force-device-scale-factor', 1);
+ app.allowRendererProcessReuse = false;
app.on('ready', async () => {

In @jest-runner/electron/build/electron_process_injected_code.js:

_electron.app.commandLine.appendSwitch('high-dpi-support', 1);
_electron.app.commandLine.appendSwitch('force-device-scale-factor', 1);
+ _electron.app.allowRendererProcessReuse = false;
_electron.app.on('ready', async () => {

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants