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/JestMatchers.md
+5-1Lines changed: 5 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -3,9 +3,13 @@ id: jest-matchers
3
3
title: Jest Matchers
4
4
---
5
5
6
+
:::note
7
+
Built-in Jest matchers require RNTL v12.4.0 or later.
8
+
:::
9
+
6
10
This guide describes built-in Jest matchers, we recommend using these matchers as they provide more readable tests, better accessibility support and better developer experience.
7
11
8
-
If you are already using legacy Jest Native matchers we have a [migration guide](MigrationJestMatchers.md) for moving to the built-in matchers.
12
+
If you are already using legacy Jest Native matchers we have a [migration guide](migration-jest-native) for moving to the built-in matchers.
Copy file name to clipboardExpand all lines: website/docs/MigrationJestMatchers.md
+19-19Lines changed: 19 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ id: migration-jest-native
3
3
title: Migration from Jest Native matchers
4
4
---
5
5
6
-
This guide describes steps necessary to migrate from [legacy Jest Native matchers](https://github.com/testing-library/jest-native)`v5` to [built-in Jest matchers](JestMatchers.md).
6
+
This guide describes steps necessary to migrate from [legacy Jest Native matchers](https://github.com/testing-library/jest-native)`v5` to [built-in Jest matchers](jest-matchers).
`toHaveAccessibilityValue()` matcher has been renamed to [`toHaveAccessibleValue()`](JestMatchers.md#tohaveaccessiblevalue) but otherwise should work the same.
60
+
`toHaveAccessibilityValue()` matcher has been renamed to [`toHaveAccessibleValue()`](jest-matchers#tohaveaccessiblevalue) but otherwise should work the same.
61
61
62
62
### Removed matchers
63
63
64
64
`toHaveAccessibilityState()` matcher has been replaced by following matchers:
The new matchers support both `accessbililityState` and `aria-*` props.
72
72
73
73
You should be aware of following changes:
74
-
*[`toBeEnabled()` / `toBeDisabled()`](JestMatchers.md#tobeenabled) matchers also check the disabled state for element ancestors and not only the element itself
75
-
*[`toBeChecked()`](JestMatchers.md#tobechecked) matcher supports only elements with `checkbox` or `radio` role
76
-
*[`toBePartiallyChecked()`](JestMatchers.md#tobechecked) matchers supports only elements with `checkbox` role
74
+
*[`toBeEnabled()` / `toBeDisabled()`](jest-matchers#tobeenabled) matchers also check the disabled state for element ancestors and not only the element itself
75
+
*[`toBeChecked()`](jest-matchers#tobechecked) matcher supports only elements with `checkbox` or `radio` role
76
+
*[`toBePartiallyChecked()`](jest-matchers#tobechecked) matchers supports only elements with `checkbox` role
0 commit comments