Skip to content

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