How to test the renderer with Electron 10?
See original GitHub issueHi @jprichardson,
I have been using electron-mocha with great success so far with Electron <= 9. Now I am testing Electron 10 (beta), but electron-mocha fails to test the renderer. When running electron-mocha --renderer "test.js" --no-sandbox
on a simple Electron 10 app (with a simple test in the test.js
file), there is no output and electron-mocha is stuck. With Electron 9 the renderer tests work normally. Also, the main tests work as expected.
To quickly reconstruct the problem, I forked electron-quick-start
and added electron-mocha. You can clone this repo and run the tests yourself:
https://github.com/ffflorian/electron-quick-start
// cc @inukshuk
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
IPC Main <-> Renderer Example Test · Issue #184 - GitHub
I'm running into a an interesting problem with ELectron 12.0.2 , Sinon 10.0.0 and electron-mocha 9.3.3 . I'm converting all IPC calls to...
Read more >Testing - Electron
To run all unit tests, run npm run test . The unit tests are an Electron app (surprise!) that can be found in...
Read more >Using Electron 10 with Requirejs in renderer returns an error
I have been using requirejs (latest) with Electron 9, but since Electron 10 when including it in the renderer script I see the...
Read more >Electron and React integration done right - Patrick Passarella
In this post, I will show you how to create a full React and Electron app, test, and build it. Summary. React app...
Read more >Notes on running Electron - DataStation
Electron comes with only the most minimal API for communicating between the render process and the main process. In fact it almost doesn't...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just noticed that mocha changed some call signatures to be async – so now there are likely race conditions when requiring modules in 9.x. I’ll fix that later today!
Thanks for reporting! Just pushed version 9.0.0 which works with Electron 10.