Skip to content

Commit 39a6b26

Browse files
committed
Re-add with correct formatting.
1 parent a8d11f7 commit 39a6b26

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,6 +1128,30 @@ snapshotDiff(firstVersion, container.cloneNode(true))
11281128
11291129
</details>
11301130
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+
11311155
## Other Solutions
11321156
11331157
In preparing this project,

0 commit comments

Comments
 (0)