You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: versioned_docs/version-7.x/testing.md
+98-7Lines changed: 98 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -74,7 +74,7 @@ If you're not using Jest, then you'll need to mock these modules according to th
74
74
75
75
We recommend using [React Native Testing Library](https://callstack.github.io/react-native-testing-library/) along with [`jest-native`](https://github.com/testing-library/jest-native) to write your tests.
76
76
77
-
We are going to write example tests for Root Navigator defined below:
77
+
We are going to write example tests illustrating difference between navigate and push functions using Root Navigator defined below:
@@ -163,7 +216,45 @@ test('shows settings screen when Navigate to Settings is pressed', () => {
163
216
164
217
For writing tests that include times functions you will need to use [Fake Timers](https://jestjs.io/docs/timer-mocks). They will replace times function implementation to use time from the fake clock.
165
218
166
-
Test Example:
219
+
Let's add another button to the Profile screen which uses `setTimeout`:
0 commit comments