react-native/jest
Julien Moutte bbceb48dbb Direct assignment of the ref to avoid warning when mocking.
Summary:
When Jest is mocking native components that are assigned a ref with an arrow function, a warning is generated about stateless components which can not have a ref. This does not happen when the ref is assigned directly.

Fixes #16045.
<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

The test provided in the related issue is used to validate the fix. I don't know how to detect console warnings in a Jest test.
Closes https://github.com/facebook/react-native/pull/16046

Differential Revision: D6017903

Pulled By: ericnakagawa

fbshipit-source-id: a7ed61c39f141a4094f08fc875289a7a79ebe9e8
2017-10-09 21:46:20 -07:00
..
.eslintrc Disallow trailing commas in react-native-github 2017-08-17 16:20:04 -07:00
assetFileTransformer.js Fix test for RN asset 2017-09-07 01:55:56 -07:00
mockComponent.js Revert D5409825: [RN] Convert easy files to Prettier 2017-07-12 19:23:58 -07:00
preprocessor.js @allow-large-files Flow v0.54.0 2017-09-06 03:33:43 -07:00
setup.js Direct assignment of the ref to avoid warning when mocking. 2017-10-09 21:46:20 -07:00