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

feat: export jestSetup for mocks #116

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

coolsoftwaretyler
Copy link

Hey folks,

I needed to set up a Jest mock for the library and found #12. I think the sample mock in that issue works pretty well, and including it in the codebase should make it easy to keep up to date.

I followed the naming scheme that react-native-gesture-handler uses (jestSetup.js) and added it to the package.json files array.

I'm happy to add some docs, but not exactly sure where the best spot to put them is. Users should be able to access the mock by importing it like this:

import "react-native-gesture-handler/jestSetup"

At the top of their jest.setup.ts file.

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