{"action":"created","issue":{"url":"https://api.github.com/repos/facebook-atom/jest-electron-runner/issues/5","repository_url":"https://api.github.com/repos/facebook-atom/jest-electron-runner","labels_url":"https://api.github.com/repos/facebook-atom/jest-electron-runner/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/facebook-atom/jest-electron-runner/issues/5/comments","events_url":"https://api.github.com/repos/facebook-atom/jest-electron-runner/issues/5/events","html_url":"https://github.com/facebook-atom/jest-electron-runner/issues/5","id":374206575,"node_id":"MDU6SXNzdWUzNzQyMDY1NzU=","number":5,"title":"Spawns multiple processes when using --watch","user":{"login":"JM-Mendez","id":24993360,"node_id":"MDQ6VXNlcjI0OTkzMzYw","avatar_url":"https://avatars3.githubusercontent.com/u/24993360?v=4","gravatar_id":"","url":"https://api.github.com/users/JM-Mendez","html_url":"https://github.com/JM-Mendez","followers_url":"https://api.github.com/users/JM-Mendez/followers","following_url":"https://api.github.com/users/JM-Mendez/following{/other_user}","gists_url":"https://api.github.com/users/JM-Mendez/gists{/gist_id}","starred_url":"https://api.github.com/users/JM-Mendez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JM-Mendez/subscriptions","organizations_url":"https://api.github.com/users/JM-Mendez/orgs","repos_url":"https://api.github.com/users/JM-Mendez/repos","events_url":"https://api.github.com/users/JM-Mendez/events{/privacy}","received_events_url":"https://api.github.com/users/JM-Mendez/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-26T02:53:01Z","updated_at":"2018-10-26T13:09:23Z","closed_at":null,"author_association":"NONE","body":"Hi, first off thanks for this package. Solves many issues for me. \r\n\r\nI have one issue tho. When running using `--watch`, I get multiple electron processes on each change. I was able to solve it by running `cleanup` after all tests, and it doesn't seem to cause any other issues or run differently.\r\n\r\nI just removed this conditional.\r\nhttps://github.com/facebook-atom/jest-electron-runner/blob/c4d7786a55b86d0b1d63c224d82c7d55660a41de/packages/electron/src/TestRunner.js#L129\r\n\r\nNot sure if I'm missing something, or if this even merits a pull request. But I'd be happy to contribute with whatever you suggest.\r\n"},"comment":{"url":"https://api.github.com/repos/facebook-atom/jest-electron-runner/issues/comments/433401712","html_url":"https://github.com/facebook-atom/jest-electron-runner/issues/5#issuecomment-433401712","issue_url":"https://api.github.com/repos/facebook-atom/jest-electron-runner/issues/5","id":433401712,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMzQwMTcxMg==","user":{"login":"JM-Mendez","id":24993360,"node_id":"MDQ6VXNlcjI0OTkzMzYw","avatar_url":"https://avatars3.githubusercontent.com/u/24993360?v=4","gravatar_id":"","url":"https://api.github.com/users/JM-Mendez","html_url":"https://github.com/JM-Mendez","followers_url":"https://api.github.com/users/JM-Mendez/followers","following_url":"https://api.github.com/users/JM-Mendez/following{/other_user}","gists_url":"https://api.github.com/users/JM-Mendez/gists{/gist_id}","starred_url":"https://api.github.com/users/JM-Mendez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JM-Mendez/subscriptions","organizations_url":"https://api.github.com/users/JM-Mendez/orgs","repos_url":"https://api.github.com/users/JM-Mendez/repos","events_url":"https://api.github.com/users/JM-Mendez/events{/privacy}","received_events_url":"https://api.github.com/users/JM-Mendez/received_events","type":"User","site_admin":false},"created_at":"2018-10-26T13:09:23Z","updated_at":"2018-10-26T13:09:23Z","author_association":"NONE","body":"After further test runs I discovered that rather than close the whole process, it was better to call `jestWorkerRPCProcess.start()` within the conditional below. This has allowed me to reuse the process making tests after the first run faster.\r\n\r\nhttps://github.com/facebook-atom/jest-electron-runner/blob/c4d7786a55b86d0b1d63c224d82c7d55660a41de/packages/electron/src/TestRunner.js#L62"}}
{"actor":{"display_login":"JM-Mendez"}}