From 583c42a1d25783abe878d84ab6c6e36000d21da6 Mon Sep 17 00:00:00 2001 From: Steve Galili Date: Thu, 18 Jun 2020 21:08:20 +0200 Subject: [PATCH] Update setup.md Hi there! I was struggling to find a solution to this problem, after digging enough i found this temp fix somebody made. I'd really like to add this temporarily until fixed to a new section called 'Known issues' Is there a way somebody could give me a small intro on how to fix this issue in the library's code base? Thanks in advance :pray: Regards, Steve --- docs/setup.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/setup.md b/docs/setup.md index 6098e22..6797d81 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -101,3 +101,25 @@ module.exports = { // ... other options ... } ``` +#### Known issues + +TouchableOpacity not visible when using RN 0.62 + +see https://github.com/testing-library/native-testing-library/issues/113 + +You can apply this temporary fix by mocking TouchableOpacity with TouchableHighlight in jest.setup.js file: + +```js +jest.mock( + 'react-native/Libraries/Components/Touchable/TouchableOpacity.js', + () => { + const { TouchableHighlight } = require('react-native') + const MockTouchable = props => { + return + } + MockTouchable.displayName = 'TouchableOpacity' + + return MockTouchable + } +) +```