Skip to content

Commit 7f3983c

Browse files
committed
[v13] chore: increase required React et al. versions
1 parent b5cfb98 commit 7f3983c

File tree

2 files changed

+3
-17
lines changed

2 files changed

+3
-17
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@
5757
},
5858
"peerDependencies": {
5959
"jest": ">=28.0.0",
60-
"react": ">=18.2.0",
61-
"react-native": ">=0.73",
62-
"react-test-renderer": ">=18.2.0"
60+
"react": ">=18.3.0",
61+
"react-native": ">=0.75",
62+
"react-test-renderer": ">=18.3.0"
6363
},
6464
"peerDependenciesMeta": {
6565
"jest": {

website/docs/12.x/docs/api/misc/async.mdx

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,6 @@ Avoiding side effects in `expectation` callback can be partially enforced with t
5353

5454
It is also recommended to have a [single assertion per each `waitFor`](https://kentcdodds.com/blog/common-mistakes-with-react-testing-library#having-multiple-assertions-in-a-single-waitfor-callback) for more consistency and faster failing tests. If you want to make several assertions, then they should be in seperate `waitFor` calls. In many cases you won't actually need to wrap the second assertion in `waitFor` since the first one will do the waiting required for asynchronous change to happen.
5555

56-
### Using a React Native version < 0.71 with Jest fake timers
57-
58-
:::caution
59-
When using a version of React Native < 0.71 and modern fake timers (the default for `Jest` >= 27), `waitFor` won't work (it will always timeout even if `expectation()` doesn't throw) unless you use the custom [@testing-library/react-native preset](https://github.com/callstack/react-native-testing-library#custom-jest-preset).
60-
:::
61-
6256
`waitFor` checks whether Jest fake timers are enabled and adapts its behavior in such case. The following snippet is a simplified version of how it behaves when fake timers are enabled:
6357

6458
```tsx
@@ -96,10 +90,6 @@ await waitFor(() => {
9690
}, 10000);
9791
```
9892

99-
:::info
100-
In order to properly use `waitFor` you need at least React >=16.9.0 (featuring async `act`) or React Native >=0.61 (which comes with React >=16.9.0).
101-
:::
102-
10393
:::note
10494
If you receive warnings related to `act()` function consult our [Undestanding Act](docs/advanced/understanding-act.md) function document.
10595
:::
@@ -129,10 +119,6 @@ This method expects that the element is initially present in the render tree and
129119

130120
You can use any of `getBy`, `getAllBy`, `queryBy` and `queryAllBy` queries for `expectation` parameter.
131121

132-
:::info
133-
In order to properly use `waitForElementToBeRemoved` you need at least React >=16.9.0 (featuring async `act`) or React Native >=0.61 (which comes with React >=16.9.0).
134-
:::
135-
136122
:::note
137123
If you receive warnings related to `act()` function consult our [Undestanding Act](docs/advanced/understanding-act.md) function document.
138124
:::

0 commit comments

Comments
 (0)