fix: cannot access nativeTheme via electron.remote (#20938)

This commit is contained in:
Milan Burda 2019-11-04 23:17:03 +01:00 committed by Samuel Attard
commit 01e18c2fc3
3 changed files with 6 additions and 4 deletions

View file

@ -155,10 +155,10 @@ ifdescribe(features.isRemoteModuleEnabled())('remote module', () => {
})
describe('remote modules', () => {
it('includes browser process modules as properties', () => {
expect(remote.app.getPath).to.be.a('function')
expect(remote.webContents.getFocusedWebContents).to.be.a('function')
expect(remote.clipboard.readText).to.be.a('function')
it('includes browser process modules as properties', async () => {
const mainModules = await ipcRenderer.invoke('get-modules')
const remoteModules = mainModules.filter(name => remote[name])
expect(remoteModules).to.be.deep.equal(mainModules)
})
it('returns toString() of original function via toString()', () => {