facebook-atom / jest-electron-runner

custom test runner for Jest that allows tests to be run in Electron environment
MIT License
189 stars 33 forks source link

Re-enable electron.remote #77

Closed neojski closed 1 year ago

neojski commented 3 years ago

electron disabled access to electron.remote by default but it's rather convenient for tests, e.g.:

const image = await electron.remote.getCurrentWindow().capturePage();
image.toPNG();
mankeheaven commented 3 years ago

expected pr to be merged

options like this is needed

enableRemoteModule: true,  //import
enableWebSQL: false,
nodeIntegration: true, //import
spellcheck: false,
webSecurity: false,
contextIsolation: false,  //import