-
Hi guys, |
Beta Was this translation helpful? Give feedback.
Answered by
ZikaZaki
Sep 4, 2022
Replies: 1 comment 2 replies
-
Hi @RubyStack, The solution is to mock your own fake localStorage support like below: browserMocks.js
|
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
RubyStack
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @RubyStack,
In fact, the Jest library does not support calls to
localStorage
. It is not a browser and doesn't implement localStorage.The solution is to mock your own fake localStorage support like below:
browserMocks.js