You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: mock electron module for CI environment in systemControl tests
The handleElectronActions tests were failing in GitHub Actions because
require.cache manipulation doesn't work for the electron module in CI.
Solution: Extend Module.prototype.require to intercept electron imports
and return a mock when currentElectronMock is set. This approach works
consistently across local and CI environments.
- Add currentElectronMock global variable
- Intercept 'electron' requires in Module.prototype.require override
- Update beforeEach/afterEach to set/clear currentElectronMock
- Remove require.cache manipulation for electron
0 commit comments