Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • This can help me, I use queryByTestId() and check with toBeNull() Commented Feb 17, 2023 at 4:35
  • 1
    The queryBy matchers are what I always use for testing if something doesn't exist. For example, the assertion expect(queryByTestId('some-button')).notToBeInTheDocument() will pass if that button is not rendered. Commented Aug 16, 2023 at 18:17
  • Arigato/Dankeschön/Thanks. Read more and probably image ref Commented Sep 7, 2023 at 9:34
  • 1
    Please add the source link so that others can understand whether this is up-to-date Commented Feb 28, 2024 at 9:45