Skip to content
masterclass Buddy

React Testing Library · Matcher

toBeEmptyDOMElement

toBeEmptyDOMElement checks whether a DOM element is empty. It is a jasmine-dom matcher for Jasmine tests.

Last updated

Syntax

expect(element).toBeEmptyDOMElement()

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • @testing-library/jasmine-dom
  • queryByTestId
  • getByTestId
  • toBeVisible

Source: jasmine-dom | Testing Library. Checked 2026-11-03.