Skip to content
This repository has been archived by the owner on Jun 15, 2024. It is now read-only.

Commit

Permalink
test: fix localStorage condition in mock
Browse files Browse the repository at this point in the history
  • Loading branch information
drichar committed Dec 10, 2023
1 parent 98f97fa commit f4f7b6e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion __tests__/store/store.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const localStorageMock = (() => {
clear: () => (store = {})
}
})()
if (!localStorage) {
if (typeof localStorage === 'undefined') {
Object.defineProperty(global, 'localStorage', {
value: localStorageMock
})
Expand Down
2 changes: 1 addition & 1 deletion __tests__/wallets/manager.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const localStorageMock = (() => {
clear: () => (store = {})
}
})()
if (!localStorage) {
if (typeof localStorage === 'undefined') {
Object.defineProperty(global, 'localStorage', {
value: localStorageMock
})
Expand Down

0 comments on commit f4f7b6e

Please sign in to comment.