diff --git a/packages/desktop/src/main/main.test.ts b/packages/desktop/src/main/main.test.ts index 66d2873457..f4a13e3f21 100644 --- a/packages/desktop/src/main/main.test.ts +++ b/packages/desktop/src/main/main.test.ts @@ -20,7 +20,6 @@ const mockWindowOnce = jest.fn() const mockSetMovable = jest.fn() const mockSetAlwaysOnTop = jest.fn() -const spyApplyDevTools = jest.spyOn(main, 'applyDevTools') const spyCreateWindow = jest.spyOn(main, 'createWindow') const spyGetPorts = jest.spyOn(backendHelpers, 'getPorts') @@ -137,11 +136,6 @@ describe('electron app ready event', () => { expect(setApplicationMenu).toHaveBeenCalledWith(null) }) - // todo - // it('apply devtools logic will trigger one time and ... todo', async () => { - // expect(spyApplyDevTools).toHaveBeenCalledTimes(1) - // }) - it('get ports logic will trigger and will return propper ports', async () => { expect(spyGetPorts).toHaveBeenCalledTimes(1) const getPortsResult = async (): Promise => spyGetPorts.mock.results[0].value diff --git a/packages/desktop/src/main/main.ts b/packages/desktop/src/main/main.ts index 0617bc9e64..9c036f8f0e 100644 --- a/packages/desktop/src/main/main.ts +++ b/packages/desktop/src/main/main.ts @@ -132,12 +132,21 @@ export const applyDevTools = async () => { ] await Promise.all( extensionsData.map(async extension => { - await installer.default(extension.name) + try { + await installer.default(extension.name) + } catch (error) { + logger.error(`Failed to install ${extension.name}:${extension.path}:`, error) + } }) ) + await Promise.all( extensionsData.map(async extension => { - await session.defaultSession.loadExtension(extension.path, { allowFileAccess: true }) + try { + await session.defaultSession.loadExtension(extension.path, { allowFileAccess: true }) + } catch (error) { + logger.error(`Failed to load extension from ${extension.path}:`, error) + } }) ) }