File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -1128,6 +1128,30 @@ snapshotDiff(firstVersion, container.cloneNode(true))
1128
1128
1129
1129
</details>
1130
1130
1131
+ <details>
1132
+
1133
+ <summary>Does this library work with React Native?</summary>
1134
+
1135
+ > This is still quite experimental - please contribute with your own
1136
+ > results/findings!
1137
+
1138
+ The short answer is yes, but with a few caveats. It's possible to replicate a
1139
+ lot of DOM functionality with
1140
+ [ ` react - native - web ` ](https://github.com/necolas/react-native-web), allowing you
1141
+ to use the query APIs like ` getByText ` . You can then add a ` press ` event to
1142
+ ` fireEvent ` that simulates a mouseDown immediately followed by a mouseUp, and
1143
+ call this with Touchable\* components.
1144
+
1145
+ One thing this approach does _not_ support is any kind of native module
1146
+ functionality (like native navigation modules). The way around this is to design
1147
+ your components so that as much of the functionality you need tested is
1148
+ encapsulated outside of any native module functionality.
1149
+
1150
+ For a barebones example of testing a React Native component,
1151
+ [see here](https://github.com/thchia/rn-testing-library-example).
1152
+
1153
+ </details>
1154
+
1131
1155
## Other Solutions
1132
1156
1133
1157
In preparing this project,
You can’t perform that action at this time.
0 commit comments