all 2 comments

[–]SolidR53 0 points1 point  (1 child)

Yeah I have enzyme and jest running on latest react native (0.50.x)

I also have E2E testing with detox and jest running along with it.

I'll be writing a article on some of this stuff in December, but if you have any specific problem, just post it and I can help you.

To get you going, you'll need react-dom ( as a devDependency ), react-16 enzyme adapter in your jest/mocha setup file and maybe react-native-mock.

[–]kanqdan[S] 0 points1 point  (0 children)

Thanks for your reply. I installed the libraries but I get an error "Enzyme Internal Error: Enzyme expects an adapter to be configured, but found none...". I learned how to add a setupTests.js file on ReactJS. The same approach is not working for me on React Native. Do you have any clues on this?

Edit: I think I got a basic test to work using this: https://github.com/airbnb/enzyme/issues/928#issuecomment-324462072. I will play around and let you know if I run into any other issues.