Loading

It’s pretty straightforward to assert that a certain element is rendered with react-testing-library, but what if we want to ensure that something is NOT being rendered. For example, if we re-render our component with a different maximum amount leading to the error message being hidden. Let’s see how we can use the query* APIs from react-testing-library to assert that certain elements are not rendered.

Transcript

Assert That Something is NOT Rendered with React Testing Library