nx-electron
nx-electron copied to clipboard
Testing steps (seem) to be wrong
Describe the bug I'm trying to test an angular app that uses ngx-electron, so I would assume that the test command template would work, but it doesnt
To Reproduce Steps to reproduce the behavior:
- Initalize nx workspace using angular
- add ngx-electron 2.1 yarn add ngx-electron 2.2 import NgxElectronModule from it and add it into your app modules import 2.3 create a service with tests 2.4 inject ElectronService
- add an electron app using this that points to the angular project
- run
nx run-many --target=test --projects=<frontend-app>,<electron-app> --parallel
- See error
Expected behavior It runs the electron app and works
Screenshots
Desktop (please complete the following information):
- OS: Windows 11 Insider build
- Nx Electron Version 11.1.3
Additional context If you need code I can provide I repo soon:tm:
Ok So I figured out why that error occurs(forgot to import and inject when testing) but it seems that ipcRenderer is null when testing, even though it works perfectly fine normally
Hi, I think you need to run inside an electron app in order that the ipc renderer will be initialized. So you can just test it just on the frontend.
Hi, I think you need to run inside an electron app in order that the ipc renderer will be initialized. So you can just test it just on the frontend.
yes, but how?