From 9eed228901fae63d48db7db623c1b6922e81d1d9 Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Thu, 21 Apr 2022 13:27:03 -0400 Subject: [PATCH] fix closing-preferences.test.tsx Signed-off-by: Sebastian Malton --- .../closing-preferences.test.tsx.snap | 38 +++++++------------ .../preferences/closing-preferences.test.tsx | 11 +++--- 2 files changed, 19 insertions(+), 30 deletions(-) diff --git a/src/behaviours/preferences/__snapshots__/closing-preferences.test.tsx.snap b/src/behaviours/preferences/__snapshots__/closing-preferences.test.tsx.snap index d0f2586641..9c6c48b0b3 100644 --- a/src/behaviours/preferences/__snapshots__/closing-preferences.test.tsx.snap +++ b/src/behaviours/preferences/__snapshots__/closing-preferences.test.tsx.snap @@ -117,7 +117,7 @@ exports[`preferences - closing-preferences given accessing preferences directly class="SubTitle" > Theme - +
Extension Install Registry - +
This setting is to change the registry URL for installing extensions by name. - - If you are unable to access the default registry ( - https://registry.npmjs.org - ) - - you can change it in your + If you are unable to access the default registry (https://registry.npmjs.org) you can change it in your .npmrc -  file or in the input below. + file or in the input below.

Start-up - +
Locale Timezone - +
Theme - +
Extension Install Registry - +
This setting is to change the registry URL for installing extensions by name. - - If you are unable to access the default registry ( - https://registry.npmjs.org - ) - - you can change it in your + If you are unable to access the default registry (https://registry.npmjs.org) you can change it in your .npmrc -  file or in the input below. + file or in the input below.

Start-up - +
Locale Timezone - +
{ let applicationBuilder: ApplicationBuilder; @@ -45,10 +44,10 @@ describe("preferences - closing-preferences", () => { } as unknown as UserStore; rendererDi.override(userStoreInjectable, () => userStoreStub); - - const themeStoreStub = { themeOptions: [] } as unknown as ThemeStore; - - rendererDi.override(themeStoreInjectable, () => themeStoreStub); + rendererDi.override(ipcRendererInjectable, () => ({ + on: jest.fn(), + invoke: jest.fn(), // TODO: replace with proper mocking via the IPC bridge + } as never)); rendererDi.override(navigateToFrontPageInjectable, (di) => { const navigateToRoute = di.inject(navigateToRouteInjectionToken);