diff --git a/__tests__/store/store.test.ts b/__tests__/store/store.test.ts index 9005bcd..fb1f1cd 100644 --- a/__tests__/store/store.test.ts +++ b/__tests__/store/store.test.ts @@ -20,7 +20,7 @@ const localStorageMock = (() => { clear: () => (store = {}) } })() -if (!localStorage) { +if (typeof localStorage === 'undefined') { Object.defineProperty(global, 'localStorage', { value: localStorageMock }) diff --git a/__tests__/wallets/manager.test.ts b/__tests__/wallets/manager.test.ts index 0de9e4e..aa3ea3e 100644 --- a/__tests__/wallets/manager.test.ts +++ b/__tests__/wallets/manager.test.ts @@ -22,7 +22,7 @@ const localStorageMock = (() => { clear: () => (store = {}) } })() -if (!localStorage) { +if (typeof localStorage === 'undefined') { Object.defineProperty(global, 'localStorage', { value: localStorageMock })