Skip to content

Conversation

tannerkrewson
Copy link

I tried to use this code example to mock the localStorage in a unit test. I was getting a "not a mock error", so I eventually ended up doing a console.log(localStorageMock == global.localStorage) directly after the line I removed in this PR, and it would return false. With this fix, it returns true and my tests are working.

@facebook-github-bot
Copy link

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@ianschmitz
Copy link
Contributor

Closing as a dupe of #6882. Thanks for the PR!

@ianschmitz ianschmitz closed this Aug 12, 2019
@lock lock bot locked and limited conversation to collaborators Aug 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants