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

fix(docs): update testing doc #1739

Merged
merged 6 commits into from
Apr 7, 2023
Merged

Conversation

dbritto-dev
Copy link
Collaborator

Related Issues or Discussions

Fixes #905

Summary

Update testing doc to support w/o middleware testing Zustand using Jest

Check List

  • yarn run prettier for formatting code and docs

@codesandbox-ci
Copy link

codesandbox-ci bot commented Apr 7, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit cee694b:

Sandbox Source
React Configuration
React Typescript Configuration
React Browserify Configuration
React Snowpack Configuration
React Parcel Configuration
@pavlobu/zustand demo Configuration

docs/guides/testing.md Outdated Show resolved Hide resolved
Comment on lines +39 to +41
In [jest](https://jestjs.io/), you can create a `__mocks__/zustand.js` and place the code in that
file. If your app is using `zustand/vanilla` instead of `zustand`, then you'll have to place the
above code in `__mocks__/zustand/vanilla.js`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From previous PR:

Nitpick: I find it easier to read and edit if the newlines are inserted after logical pauses in sentences, like commas or full stops.

See https://sembr.org/, it's a great read :)

Copy link
Collaborator Author

@dbritto-dev dbritto-dev Apr 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sewera thanks for the feedback. I was trying to fit everything under max length 100

image

@dbritto-dev dbritto-dev changed the title Update testing doc fix(docs): update testing doc Apr 7, 2023
@dai-shi dai-shi merged commit 4c2c482 into pmndrs:main Apr 7, 2023
@dbritto-dev dbritto-dev deleted the update-testing-doc branch April 8, 2023 19:54
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.

Zustand testing throws an error "TypeError: store.getState is not a function"
3 participants