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: website/docs/GettingStarted.md
+35-16Lines changed: 35 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,9 @@ id: getting-started
3
3
title: Getting Started
4
4
---
5
5
6
+
import Tabs from '@theme/Tabs';
7
+
import TabItem from '@theme/TabItem';
8
+
6
9
## The problem
7
10
8
11
You want to write maintainable tests for your React Native components. As a part of this goal, you want your tests to avoid including implementation details of your components and focus on making your tests give you the confidence they are intended. As part of this, you want your tests to be maintainable in the long run so refactors of your components (changes to implementation but not functionality) don't break your tests and slow you and your team down.
@@ -21,38 +24,54 @@ You can find the source of the `QuestionsBoard` component and this example [here
This library has a peer dependency for `react-test-renderer` package. Make sure that your `react-test-renderer` version matches exactly your `react` version.
37
41
38
-
:::info
39
-
To properly use helpers for async tests (`findBy` queries and `waitFor`), you need at least React >=16.9.0 (featuring async `act`) or React Native >=0.61 (which comes with React >=16.9.0).
40
-
:::
42
+
### Jest matchers
41
43
42
-
### Additional Jest matchers
43
-
44
-
To use additional React Native-specific Jest matchers, add the following line to your `jest-setup.ts` file (configured using [`setupFilesAfterEnv`](https://jestjs.io/docs/configuration#setupfilesafterenv-array)):
44
+
To set up React Native-specific Jest matchers, add the following line to your `jest-setup.ts` file (configured using [`setupFilesAfterEnv`](https://jestjs.io/docs/configuration#setupfilesafterenv-array)):
We recommend setting up [`eslint-plugin-testing-library`](https://github.com/testing-library/eslint-plugin-testing-library) package to help you avoid common Testing Library mistakes and bad practices.
51
53
52
-
Note for [Flow](https://flow.org) users – you'll also need to install typings for `react-test-renderer`:
54
+
Install the plugin (assuming you already have `eslint` installed & configured):
0 commit comments