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

Can't copy .asar file when using @jest-runner/electron/main #80

Open packlikez opened 3 years ago

packlikez commented 3 years ago

I assigned process.noAsar = true, and it works when not using runner, but when I'm using the runner, it shows error Invalid package

fs-extra: ^9.1.0, @jest-runner/electron: ^3.0.1, nodejs: 14.15.4

packlikez commented 3 years ago

I found that jest-electron-runner didn't passes process.noAsar into electron when spawn electron child process. So, it's not affect the electron at all. And, I tried to use process.env.ELECTRON_NO_ASAR instead but it's not working because it have to use with process.env.ELECTRON_RUN_AS_NODE which is will break the jest-electron-runner