-
-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error spying on sessionStorage #1368
Labels
bug
Something isn't working
Comments
capricorn86
added a commit
that referenced
this issue
Mar 26, 2024
capricorn86
added a commit
that referenced
this issue
Mar 26, 2024
…nstorage fix: [#1368] Fixes problem with spying on properties in Storage
That was fast. Thanks. |
Hey, I'm using Here's the test code: jest.spyOn(localStorage, 'setItem').mockImplementationOnce(() => {
throw new Error('error');
}); Thanks ! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When using
spyOn
in sessionStorage (vitest), the following message is displayed:'defineProperty' on proxy: trap returned falsish for property 'getItem'
To Reproduce
Sample code
The text was updated successfully, but these errors were encountered: