From 940feafece69140ee25a2e25631cae6385faa6df Mon Sep 17 00:00:00 2001 From: yougotwill Date: Thu, 25 Jul 2024 16:56:02 +1000 Subject: [PATCH] fix: remove stubstorage --- .../unit/onboarding/Onboarding_test.ts | 1 - ts/test/test-utils/utils/stubbing.ts | 22 ------------------- 2 files changed, 23 deletions(-) diff --git a/ts/test/session/unit/onboarding/Onboarding_test.ts b/ts/test/session/unit/onboarding/Onboarding_test.ts index 18d99d1c3..bc675180f 100644 --- a/ts/test/session/unit/onboarding/Onboarding_test.ts +++ b/ts/test/session/unit/onboarding/Onboarding_test.ts @@ -17,7 +17,6 @@ describe('Onboarding', () => { beforeEach(() => { TestUtils.stubWindowLog(); TestUtils.stubWindowWhisper(); - TestUtils.stubStorage(); TestUtils.stubI18n(); TestUtils.stubData('createOrUpdateItem').resolves(); TestUtils.stubData('removeItemById').resolves(); diff --git a/ts/test/test-utils/utils/stubbing.ts b/ts/test/test-utils/utils/stubbing.ts index 2d61c5eff..7a6e5c02b 100644 --- a/ts/test/test-utils/utils/stubbing.ts +++ b/ts/test/test-utils/utils/stubbing.ts @@ -143,25 +143,3 @@ export const stubI18n = () => { const locale = load({ appLocale: 'en', logger: window.log }); stubWindow('i18n', setupi18n('en', locale.messages)); }; - -export const stubStorage = () => { - return { - get: (key: string, defaultValue?: any) => { - if (enableLogRedirect) { - console.info(`Storage.get ${key} returns ${defaultValue || key}`); - } - - return defaultValue || key; - }, - put: (key: string, value: any) => { - if (enableLogRedirect) { - console.info(`Storage.put ${key} with ${value}`); - } - }, - remove: (key: string) => { - if (enableLogRedirect) { - console.info(`Storage.remove ${key}`); - } - }, - }; -};