With jest-dom matchers, toBeVisible checks whether an element is visible according to DOM and style-related conditions.