From 0e7f8fb4c58a9e8d35fce84991f7d2b977fab648 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Soares?= Date: Tue, 15 Nov 2022 06:48:44 +0000 Subject: [PATCH] prevent failing due to element not found with getById --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1778f8fe..acc26932 100644 --- a/README.md +++ b/README.md @@ -464,7 +464,7 @@ descendant or not. ```javascript const ancestor = getByTestId('ancestor') const descendant = getByTestId('descendant') -const nonExistantElement = getByTestId('does-not-exist') +const nonExistantElement = queryByTestId('does-not-exist') expect(ancestor).toContainElement(descendant) expect(descendant).not.toContainElement(ancestor)