From 5cc70cfc33b9d52f0b84644b42d9c9489807922b Mon Sep 17 00:00:00 2001 From: Chris Temple Date: Tue, 27 Jul 2021 14:00:06 +0100 Subject: [PATCH] fix(jest-dom): Update deprecated messaging for toHaveDescription to provide advice on using toHaveAccessibleDescription instead --- src/to-have-description.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/to-have-description.js b/src/to-have-description.js index bc9138ab..989a5663 100644 --- a/src/to-have-description.js +++ b/src/to-have-description.js @@ -3,8 +3,8 @@ import {checkHtmlElement, getMessage, normalize, deprecate} from './utils' // See algoritm: https://www.w3.org/TR/accname-1.1/#mapping_additional_nd_description export function toHaveDescription(htmlElement, checkWith) { deprecate( - 'toBeInTheDOM', - 'Please use toBeInTheDocument for searching the entire document and toContainElement for searching a specific container.', + 'toHaveDescription', + 'Please use toHaveAccessibleDescription instead for finding nodes by their accessible description', ) checkHtmlElement(htmlElement, toHaveDescription, this)