fix: remove stubstorage

pull/3083/head
yougotwill 9 months ago
parent 46ce00e46e
commit 940feafece

@ -17,7 +17,6 @@ describe('Onboarding', () => {
beforeEach(() => {
TestUtils.stubWindowLog();
TestUtils.stubWindowWhisper();
TestUtils.stubStorage();
TestUtils.stubI18n();
TestUtils.stubData('createOrUpdateItem').resolves();
TestUtils.stubData('removeItemById').resolves();

@ -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}`);
}
},
};
};

Loading…
Cancel
Save