kayahr / jest-electron-runner

Custom test runner for Jest that allows tests to be run in Electron environment
https://www.npmjs.com/package/@kayahr/jest-electron-runner
MIT License
19 stars 4 forks source link

On windows, the `subProcess` kill logic was causing `EPERM` issues as it was trying to kill an already dead process #44

Open jglanz opened 3 weeks ago

jglanz commented 3 weeks ago

On windows, the subProcess kill logic was causing EPERM issues as it was trying to kill an already dead process

NOTE: the patch is on the compiled library, just thought I'd mention ;)

Below patch was generated via directly hacking the RPCProcess (with patch-package), but it should be fairly close to a final remedy @kayahr+jest-electron-runner+29.14.0.patch

Other than that, great work.

kayahr commented 3 weeks ago

Do you have some reproduction instructions? I use jest-electron-runner in many projects which are also used by windows developers and I never heard about this problem.

Checking the killed flag before killing the process sounds reasonable, I can apply this. But I don't understand the second change in your patch. Instead of killing the process group (negative PID) it now kills the process twice?