-
Notifications
You must be signed in to change notification settings - Fork 29
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
chore(test): Use Mocha.js instead of Jest #142
Conversation
a19dfdf
to
55ea954
Compare
55ea954
to
10a5d8e
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 great TBH! Let me know when u have time to understand better this library
"@babel/core": "^7.24.0", | ||
"@babel/preset-env": "^7.24.0", | ||
"@react-native/babel-preset": "^0.73.21", | ||
"@testing-library/react-native": "^12.4.3", | ||
"@types/jest": "^29.5.12", |
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 dope 👍
mockNative("View", { | ||
measureInWindow: callback => { | ||
const { height, width, x, y } = viewMockMeasureData; | ||
callback(x, y, width, height); | ||
}, | ||
}); | ||
|
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 PR refactors the test to use Mocha.js instead of Jest. This is possible thanks to react-native-testing-mocks. There are more than a few reasons to prefer Mocha.js over Jest, but the main benefits are: