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 SavolainenandMikko Aspiala committed 2022-05-20 14:10:33 +03:00
1 parent 890007dbdc
commit 09a499ea74
1 file changed
+2
+2
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.");