Skip to content
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

Document mock error #119

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

AtofStryker
Copy link

Hey @clarkbw,

A few peers of mine recently ran into some issues with understanding how to properly override the storage mocks within this library. mockImplementation leads to the mock being completely overwritten and persisting through mockClear calls. Though this might be clear to a lot of developers familiar with Jest, the behavior under the hood might not be as clear to those less familiar. We can leverage edge case mock overrides with mockImplementationOnce in our case due to how jest handles specificMockImpls under the hood here.

I have added some documentation to the README in 477a7e8 to help guide users in the right direction so the options to override the mock in edge cases are clearly understood.

While I was in there, I fixed a few small spelling errors and ran the linter. I hope that is OK! 😄

Let me know what you think when you can and thanks in advance for taking a look at this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant