Skip to content

Commit fa2c87e

Browse files
author
pierrezimmermann
committed
docs: add note at top level to indicate it requires an update of jest native
1 parent 9bb213e commit fa2c87e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

website/docs/MigrationV12.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ title: Migration to 12.0
55

66
React Native Testing Library 12 introduces a handful of breaking changes compared to 11.x versions. We believe they were necessary to improve the experience using the library and help the users [fall into the pit of success](https://blog.codinghorror.com/falling-into-the-pit-of-success/) when writing meaningful tests. You will find migration instructions for each and every change described below.
77

8+
:::note
9+
If you also use [@testing-library/jest-native](https://github.com/testing-library/jest-native) then you should upgrade it to version 5.4.2 or higher.
10+
:::
11+
812
# Breaking changes
913

1014
## 1. All queries exclude elements hidden from accessibility by default
@@ -56,7 +60,7 @@ Historically `container` was supposed to mimic the [RTL's container](https://tes
5660

5761
RNTL v12 introduces `root` API as an alternative that returns a root **host** element. The difference between `root` and `UNSAFE_root` properties is that that `root` will always represents a host element, while `UNSAFE_root` will typically represent a composite element.
5862

59-
If you use `toBeOnTheScreen` matcher from [@testing-library/jest-native][https://github.com/testing-library/jest-native] your tests will fail because it uses the `container` api. To fix this, update `@testing-library/jest-native` to version 5.4.2.
63+
If you use `toBeOnTheScreen` matcher from [@testing-library/jest-native](https://github.com/testing-library/jest-native) your tests will fail because it uses the `container` api. To fix this, update `@testing-library/jest-native` to version 5.4.2.
6064

6165
# Full Changelog
6266
https://github.com/callstack/react-native-testing-library/compare/v11.5.2...v11.5.2...v12.0.0-rc.0

0 commit comments

Comments
 (0)