Skip to content

Commit 5cc70cf

Browse files
committed
fix(jest-dom): Update deprecated messaging for toHaveDescription to provide advice on using toHaveAccessibleDescription instead
1 parent d24b6be commit 5cc70cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/to-have-description.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import {checkHtmlElement, getMessage, normalize, deprecate} from './utils'
33
// See algoritm: https://www.w3.org/TR/accname-1.1/#mapping_additional_nd_description
44
export function toHaveDescription(htmlElement, checkWith) {
55
deprecate(
6-
'toBeInTheDOM',
7-
'Please use toBeInTheDocument for searching the entire document and toContainElement for searching a specific container.',
6+
'toHaveDescription',
7+
'Please use toHaveAccessibleDescription instead for finding nodes by their accessible description',
88
)
99

1010
checkHtmlElement(htmlElement, toHaveDescription, this)

0 commit comments

Comments
 (0)