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: jest tests #140
feat: jest tests #140
Conversation
40ce37f
to
bdac37d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really cool! Such a common need. I had a few thoughts on various parts and left comments - curious what you think
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CI addition is fantastic, and the single jest setup line is fantastic
I left a note on including it in the released module, that's important :-)
I'm still confused about the eslint integration - I just don't understand that. We don't have to block the PR on it but if I can't understand it I would at least like a comment in there that has the URL to this discussion and a note "this may not be necessary?"
So the package.json change is the blocker, the eslint thing I'd like to understand but could let it go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a thing of beauty, thank you!
$ jest
PASS RNFBSDKExample/__tests__/App-test.js
✓ renders correctly (717 ms)
# [6.1.0](v6.0.0...v6.1.0) (2021-11-19) ### Features * **test:** add jest tests and mock file for library users ([#140](#140)) ([cc904e7](cc904e7))
🎉 This PR is included in version 6.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Hey guys! Recently I needed to create some mocks for this lib, so I'm bringing this to the lib to help others that want to do the same.
These are the features from this PR:
1 - Configure Jest
2 - Create a mock folder with
AppEventParams
andAppEvents
to make a more faithful mock, as this content came from the Native we can't access this withAppEventsLogger.AppEvents
on Jest, that's why I'm putting this on the mocks folder.3 - Update readme with a basic example module.