Created
July 17, 2021 20:18
-
-
Save jehartzog/f234efbb6c5204ed2af81addaba312ab to your computer and use it in GitHub Desktop.
Patch byText query
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/node_modules/@testing-library/react-native/build/helpers/byText.js b/node_modules/@testing-library/react-native/build/helpers/byText.js | |
index 182bc6a..54dad43 100644 | |
--- a/node_modules/@testing-library/react-native/build/helpers/byText.js | |
+++ b/node_modules/@testing-library/react-native/build/helpers/byText.js | |
@@ -54,7 +54,8 @@ const getNodeByText = (node, text) => { | |
const isTextComponent = (0, _filterNodeByType.filterNodeByType)(node, Text); | |
- if (isTextComponent) { | |
+ // https://github.com/callstack/react-native-testing-library/issues/553#issuecomment-719108211 | |
+ if (isTextComponent || true) { | |
const textChildren = getChildrenAsText(node.props.children, Text); | |
if (textChildren) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment