Skip to content

Commit 7477a9f

Browse files
committed
chore: beta release prep
1 parent b409485 commit 7477a9f

File tree

3 files changed

+24
-24
lines changed

3 files changed

+24
-24
lines changed

README-v14.md renamed to README-v13.md

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,13 @@
1212
[![MIT License][license-badge]][license]
1313
[![Sponsored by Callstack][callstack-badge]][callstack]
1414

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-
1715
## The problem
1816

1917
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.
2018

2119
## This solution
2220

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:
2422

2523
> The more your tests resemble the way your software is used, the more confidence they can give you.
2624
@@ -32,21 +30,13 @@ Open a Terminal in your project's folder and run:
3230

3331
```sh
3432
# Yarn install:
35-
yarn add --dev @testing-library/react-native@alpha
33+
yarn add --dev @testing-library/react-native
3634

3735
# NPM install
38-
npm install --save-dev @testing-library/react-native@alpha
36+
npm install --save-dev @testing-library/react-native
3937
```
4038

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:
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.
5040

5141
### Additional Jest matchers
5242

@@ -67,7 +57,7 @@ test('form submits two answers', async () => {
6757
const onSubmit = jest.fn();
6858

6959
const user = userEvent.setup();
70-
await render(<QuestionsBoard questions={questions} onSubmit={onSubmit} />);
60+
render(<QuestionsBoard questions={questions} onSubmit={onSubmit} />);
7161

7262
const answerInputs = screen.getAllByLabelText('answer input');
7363

@@ -95,7 +85,7 @@ React Native Testing Library consists of following APIs:
9585
- [`screen` object](https://callstack.github.io/react-native-testing-library/docs/api/screen) - access rendered UI:
9686
- [Queries](https://callstack.github.io/react-native-testing-library/docs/api/queries) - find rendered components by various predicates: role, text, test ids, etc
9787
- Lifecycle methods: [`rerender`](https://callstack.github.io/react-native-testing-library/docs/api/screen#rerender), [`unmount`](https://callstack.github.io/react-native-testing-library/docs/api/screen#unmount)
98-
- Helpers: [`debug`](https://callstack.github.io/react-native-testing-library/docs/api/screen#debug), [`toJSON`](https://callstack.github.io/react-native-testing-library/docs/api/screen#tojson), [`root`](https://callstack.github.io/react-native-testing-library/docs/api/screen#root), [`container`](https://callstack.github.io/react-native-testing-library/docs/api/screen#container)
88+
- Helpers: [`debug`](https://callstack.github.io/react-native-testing-library/docs/api/screen#debug), [`toJSON`](https://callstack.github.io/react-native-testing-library/docs/api/screen#tojson), [`root`](https://callstack.github.io/react-native-testing-library/docs/api/screen#root)
9989
- [Jest matchers](https://callstack.github.io/react-native-testing-library/docs/api/jest-matchers) - validate assumptions about your UI
10090
- [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
10191
- [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:
10898

10999
## Migration Guides
110100

111-
- **[Migration to 14.0](https://callstack.github.io/react-native-testing-library/docs/migration/v14)** - Drops React 18, async APIs by default
112101
- [Migration to 13.0](https://callstack.github.io/react-native-testing-library/docs/migration/v13)
113102
- [Migration to built-in Jest Matchers](https://callstack.github.io/react-native-testing-library/docs/migration/jest-matchers)
114103

README.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,15 @@
1212
[![MIT License][license-badge]][license]
1313
[![Sponsored by Callstack][callstack-badge]][callstack]
1414

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+
1517
## The problem
1618

1719
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.
1820

1921
## This solution
2022

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:
2224

2325
> The more your tests resemble the way your software is used, the more confidence they can give you.
2426
@@ -30,13 +32,21 @@ Open a Terminal in your project's folder and run:
3032

3133
```sh
3234
# Yarn install:
33-
yarn add --dev @testing-library/react-native
35+
yarn add --dev @testing-library/react-native@alpha
3436

3537
# NPM install
36-
npm install --save-dev @testing-library/react-native
38+
npm install --save-dev @testing-library/react-native@alpha
3739
```
3840

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.
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:
42+
43+
```sh
44+
# Yarn install:
45+
yarn add --dev test-renderer
46+
47+
# NPM install
48+
npm install --save-dev test-renderer
49+
```
4050

4151
### Additional Jest matchers
4252

@@ -57,7 +67,7 @@ test('form submits two answers', async () => {
5767
const onSubmit = jest.fn();
5868

5969
const user = userEvent.setup();
60-
render(<QuestionsBoard questions={questions} onSubmit={onSubmit} />);
70+
await render(<QuestionsBoard questions={questions} onSubmit={onSubmit} />);
6171

6272
const answerInputs = screen.getAllByLabelText('answer input');
6373

@@ -85,7 +95,7 @@ React Native Testing Library consists of following APIs:
8595
- [`screen` object](https://callstack.github.io/react-native-testing-library/docs/api/screen) - access rendered UI:
8696
- [Queries](https://callstack.github.io/react-native-testing-library/docs/api/queries) - find rendered components by various predicates: role, text, test ids, etc
8797
- Lifecycle methods: [`rerender`](https://callstack.github.io/react-native-testing-library/docs/api/screen#rerender), [`unmount`](https://callstack.github.io/react-native-testing-library/docs/api/screen#unmount)
88-
- Helpers: [`debug`](https://callstack.github.io/react-native-testing-library/docs/api/screen#debug), [`toJSON`](https://callstack.github.io/react-native-testing-library/docs/api/screen#tojson), [`root`](https://callstack.github.io/react-native-testing-library/docs/api/screen#root)
98+
- Helpers: [`debug`](https://callstack.github.io/react-native-testing-library/docs/api/screen#debug), [`toJSON`](https://callstack.github.io/react-native-testing-library/docs/api/screen#tojson), [`root`](https://callstack.github.io/react-native-testing-library/docs/api/screen#root), [`container`](https://callstack.github.io/react-native-testing-library/docs/api/screen#container)
8999
- [Jest matchers](https://callstack.github.io/react-native-testing-library/docs/api/jest-matchers) - validate assumptions about your UI
90100
- [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
91101
- [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:
98108

99109
## Migration Guides
100110

111+
- **[Migration to 14.0](https://callstack.github.io/react-native-testing-library/docs/migration/v14)** - Drops React 18, async APIs by default
101112
- [Migration to 13.0](https://callstack.github.io/react-native-testing-library/docs/migration/v13)
102113
- [Migration to built-in Jest Matchers](https://callstack.github.io/react-native-testing-library/docs/migration/jest-matchers)
103114

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"build": "yarn clean && yarn build:js && yarn build:ts",
4040
"release": "release-it",
4141
"release:rc": "release-it --preRelease=rc",
42-
"release:alpha": "release-it --preRelease=alpha"
42+
"release:beta": "release-it --preRelease=beta"
4343
},
4444
"files": [
4545
"build/",

0 commit comments

Comments
 (0)