1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Add missing global override

Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
Janne Savolainen 2022-05-18 12:24:17 +03:00
parent 890007dbdc
commit 09a499ea74
No known key found for this signature in database
GPG Key ID: 8C6CFB2FFFE8F68A

View File

@ -81,6 +81,7 @@ import electronUpdaterIsActiveInjectable from "./electron-app/features/electron-
import publishIsConfiguredInjectable from "./update-app/publish-is-configured.injectable"; import publishIsConfiguredInjectable from "./update-app/publish-is-configured.injectable";
import checkForPlatformUpdatesInjectable from "./update-app/check-for-platform-updates/check-for-platform-updates.injectable"; import checkForPlatformUpdatesInjectable from "./update-app/check-for-platform-updates/check-for-platform-updates.injectable";
import setUpdateOnQuitInjectable from "./electron-app/features/set-update-on-quit.injectable"; import setUpdateOnQuitInjectable from "./electron-app/features/set-update-on-quit.injectable";
import downloadPlatformUpdateInjectable from "./update-app/download-platform-update/download-platform-update.injectable";
export function getDiForUnitTesting(opts: GetDiForUnitTestingOptions = {}) { export function getDiForUnitTesting(opts: GetDiForUnitTestingOptions = {}) {
const { const {
@ -224,6 +225,7 @@ const overrideElectronFeatures = (di: DiContainer) => {
di.override(syncThemeFromOperatingSystemInjectable, () => ({ start: () => {}, stop: () => {} })); di.override(syncThemeFromOperatingSystemInjectable, () => ({ start: () => {}, stop: () => {} }));
di.override(quitAndInstallUpdateInjectable, () => () => {}); di.override(quitAndInstallUpdateInjectable, () => () => {});
di.override(setUpdateOnQuitInjectable, () => () => {}); di.override(setUpdateOnQuitInjectable, () => () => {});
di.override(downloadPlatformUpdateInjectable, () => async () => ({ downloadWasSuccessful: true }));
di.override(checkForPlatformUpdatesInjectable, () => () => { di.override(checkForPlatformUpdatesInjectable, () => () => {
throw new Error("Tried to check for platform updates without explicit override."); throw new Error("Tried to check for platform updates without explicit override.");