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: README-v13.md
+6-17Lines changed: 6 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,15 +12,13 @@
12
12
[![MIT License][license-badge]][license]
13
13
[![Sponsored by Callstack][callstack-badge]][callstack]
14
14
15
-
> ⚠️ **Alpha Version:** This version is currently in alpha. APIs and behavior may change before the stable release. Please report any issues you encounter.
16
-
17
15
## The problem
18
16
19
17
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 rather focus on making your tests give you the confidence for which 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.
20
18
21
19
## This solution
22
20
23
-
The React Native Testing Library (RNTL) is a comprehensive solution for testing React Native components. It provides React Native runtime simulation on top of `test-renderer`, in a way that encourages better testing practices. Its primary guiding principle is:
21
+
The React Native Testing Library (RNTL) is a comprehensive solution for testing React Native components. It provides React Native runtime simulation on top of `react-test-renderer`, in a way that encourages better testing practices. Its primary guiding principle is:
24
22
25
23
> The more your tests resemble the way your software is used, the more confidence they can give you.
26
24
@@ -32,21 +30,13 @@ Open a Terminal in your project's folder and run:
This library has a `peerDependencies` listing for [Test Renderer](https://github.com/mdjastrzebski/test-renderer). Make sure to install it as a dev dependency:
42
-
43
-
```sh
44
-
# Yarn install:
45
-
yarn add --dev test-renderer
46
-
47
-
# NPM install
48
-
npm install --save-dev test-renderer
49
-
```
39
+
This library has a `peerDependencies` listing for `react-test-renderer`. Make sure that your `react-test-renderer` version matches exactly the `react` version, avoid using `^` in version number.
-[Queries](https://callstack.github.io/react-native-testing-library/docs/api/queries) - find rendered components by various predicates: role, text, test ids, etc
-[Jest matchers](https://callstack.github.io/react-native-testing-library/docs/api/jest-matchers) - validate assumptions about your UI
100
90
-[User Event](https://callstack.github.io/react-native-testing-library/docs/api/events/user-event) - simulate common user interactions like [`press`](https://callstack.github.io/react-native-testing-library/docs/api/events/user-event#press) or [`type`](https://callstack.github.io/react-native-testing-library/docs/api/events/user-event#type) in a realistic way
101
91
-[Fire Event](https://callstack.github.io/react-native-testing-library/docs/api/events/fire-event) - simulate any component event in a simplified way
@@ -108,7 +98,6 @@ React Native Testing Library consists of following APIs:
108
98
109
99
## Migration Guides
110
100
111
-
-**[Migration to 14.0](https://callstack.github.io/react-native-testing-library/docs/migration/v14)** - Drops React 18, async APIs by default
112
101
-[Migration to 13.0](https://callstack.github.io/react-native-testing-library/docs/migration/v13)
113
102
-[Migration to built-in Jest Matchers](https://callstack.github.io/react-native-testing-library/docs/migration/jest-matchers)
Copy file name to clipboardExpand all lines: README.md
+17-6Lines changed: 17 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,13 +12,15 @@
12
12
[![MIT License][license-badge]][license]
13
13
[![Sponsored by Callstack][callstack-badge]][callstack]
14
14
15
+
> ⚠️ **Beta Version:** This version is currently in beta. APIs and behavior may change before the stable release. Please report any issues you encounter.
16
+
15
17
## The problem
16
18
17
19
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 rather focus on making your tests give you the confidence for which 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.
18
20
19
21
## This solution
20
22
21
-
The React Native Testing Library (RNTL) is a comprehensive solution for testing React Native components. It provides React Native runtime simulation on top of `react-test-renderer`, in a way that encourages better testing practices. Its primary guiding principle is:
23
+
The React Native Testing Library (RNTL) is a comprehensive solution for testing React Native components. It provides React Native runtime simulation on top of `test-renderer`, in a way that encourages better testing practices. Its primary guiding principle is:
22
24
23
25
> The more your tests resemble the way your software is used, the more confidence they can give you.
24
26
@@ -30,13 +32,21 @@ Open a Terminal in your project's folder and run:
This library has a `peerDependencies` listing for `react-test-renderer`. Make sure that your `react-test-renderer` version matches exactly the `react` version, avoid using `^` in version number.
41
+
This library has a `peerDependencies` listing for [Test Renderer](https://github.com/mdjastrzebski/test-renderer). Make sure to install it as a dev dependency:
-[Queries](https://callstack.github.io/react-native-testing-library/docs/api/queries) - find rendered components by various predicates: role, text, test ids, etc
-[Jest matchers](https://callstack.github.io/react-native-testing-library/docs/api/jest-matchers) - validate assumptions about your UI
90
100
-[User Event](https://callstack.github.io/react-native-testing-library/docs/api/events/user-event) - simulate common user interactions like [`press`](https://callstack.github.io/react-native-testing-library/docs/api/events/user-event#press) or [`type`](https://callstack.github.io/react-native-testing-library/docs/api/events/user-event#type) in a realistic way
91
101
-[Fire Event](https://callstack.github.io/react-native-testing-library/docs/api/events/fire-event) - simulate any component event in a simplified way
@@ -98,6 +108,7 @@ React Native Testing Library consists of following APIs:
98
108
99
109
## Migration Guides
100
110
111
+
-**[Migration to 14.0](https://callstack.github.io/react-native-testing-library/docs/migration/v14)** - Drops React 18, async APIs by default
101
112
-[Migration to 13.0](https://callstack.github.io/react-native-testing-library/docs/migration/v13)
102
113
-[Migration to built-in Jest Matchers](https://callstack.github.io/react-native-testing-library/docs/migration/jest-matchers)
0 commit comments