Open daniel-nagy opened 5 years ago
there was an issue with a shared state in the early version of this runner (all tests shared the same window) and using fake timers was really unsafe, but i think current implementation should allow implementing fake timers. i have not looked into it yet!
pull request would be appreciated 🙂 here's where they're initialized (or disabled in this case) https://github.com/facebook-atom/jest-electron-runner/blob/master/packages/electron/src/Environment.js#L24-L30
Unsafe as in Spectre and Meltdown unsafe?
not that unsafe 😅
but potentially can leak state from one test to another. I think right now we're running every test in a separate electron window
and disposing it after the test is done, so it should be easy to implement the same support as the main jest runner
I created a PR here: https://github.com/facebook-atom/jest-electron-runner/pull/67
Would it be possible to implement fake timers?
It looks like fake timers have been purposefully turned off. Would it be possible to implement fake timers?