Skip to content

Commit e175f31

Browse files
committed
docs: tweaks
1 parent 1a43fc5 commit e175f31

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

website/docs/JestMatchers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ expect(element).toHaveDisplayValue(
8181

8282
This allows you to assert whether the given `TextInput` element has specified display value. It accepts either `string` or `RegExp` matchers, as well as [text match options](Queries.md#text-match-options) of `exact` and `normalizer`.
8383

84-
### `toHaveAccessibleValue()`
84+
### `toHaveAccessibilityValue()`
8585

8686
```ts
87-
expect(element).toHaveAccessibleValue(
87+
expect(element).toHaveAccessibilityValue(
8888
value: {
8989
min?: number;
9090
max?: number;

website/docs/MigrationJestMatchers.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ id: migration-jest-native
33
title: Migration from Jest Native matchers
44
---
55

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).
6+
This guide describes steps necessary to migrate from [legacy Jest Native matchers v5](https://github.com/testing-library/jest-native) to [built-in Jest matchers](jest-matchers).
77

88
import TOCInline from '@theme/TOCInline';
99

@@ -50,15 +50,12 @@ Following matchers should work the same:
5050
* [`toBeOnTheScreen()`](jest-matchers#tobeonthescreen)
5151
* [`toBeVisible()`](jest-matchers#tobevisible)
5252
* [`toContainElement()`](jest-matchers#tocontainelement)
53+
* [`toHaveAccessibilityValue()`](jest-matchers#tohaveaccessibilityvalue)
5354
* [`toHaveDisplayValue()`](jest-matchers#tohavedisplayvalue)
5455
* [`toHaveProp()`](jest-matchers#tohaveprop)
5556
* [`toHaveStyle()`](jest-matchers#tohavestyle)
5657
* [`toHaveTextContent()`](jest-matchers#tohavetextcontent)
5758

58-
### Renamed matchers
59-
60-
`toHaveAccessibilityValue()` matcher has been renamed to [`toHaveAccessibleValue()`](jest-matchers#tohaveaccessiblevalue) but otherwise should work the same.
61-
6259
### Removed matchers
6360

6461
`toHaveAccessibilityState()` matcher has been replaced by following matchers:
@@ -70,6 +67,13 @@ Following matchers should work the same:
7067

7168
The new matchers support both `accessbililityState` and `aria-*` props.
7269

70+
### Added matchers
71+
72+
Following new matchers have been added:
73+
* [`toHaveAccessibleName()`](jest-matchers#tohaveaccessiblename)
74+
75+
### Noteworthy details
76+
7377
You should be aware of following changes:
7478
* [`toBeEnabled()` / `toBeDisabled()`](jest-matchers#tobeenabled) matchers also check the disabled state for element ancestors and not only the element itself
7579
* [`toBeChecked()`](jest-matchers#tobechecked) matcher supports only elements with `checkbox` or `radio` role

0 commit comments

Comments
 (0)