-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
React Native example #1175
Comments
For the sake of conversation, I've created https://github.com/DavidBrear/jest-react-native-demo which attempts to use jest, react-native-mock, and enzyme but something has been odd because shallow rendering does not create the element with any properties. |
I'll focus on this next week with the release of Jest 14. We are skipping 13 because we are superstitious. cc @zpao. |
Any updates on this issue? I'm having trouble with using Jest and Enzyme as well. Referring to this commit https://github.com/DavidBrear/jest-react-native-demo/commit/5cce66427ead65d168d1b6ed00f4c702b777ef42
|
https://github.com/astraldragon/riki I've got a working project setup (with enzyme), but I had to put an interesting hack in place for anything using the fetch API (https://github.com/astraldragon/riki/blob/31de077b6ecbcbb0c3679d0a14676be08e08b4c0/app/actions/__tests__/library-test.js#L8. I have no clue why. I'm using the fetch-mock library. I'd appreciate any guidance. Basically if I try to change that test file from saying fetchMock.aMock to fetchMock.mock I get this error from Jest:
EDIT - I found another solution for the fetch-mock library (use their get, post, etc... functions instead of the mock function). @cpojer does jest try to do something with any call to a function that is named mock? |
Thank you for your patience. We launched Jest 14.0 with experimental react-native support: Please feel free to create new issues after trying out the new integration if any issues remain. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
we should probably add RN example to https://github.com/facebook/jest/tree/master/examples
I get asked about it a lot
cc @davidbrear
The text was updated successfully, but these errors were encountered: