I'm testing a component where if ItemLength = 1, render returns null.
const { container, debug } = render(<MyComp ItemLength={1} />);
When I call debug() in my test, it shows a <div />. How do I check that the component is returning an empty div in my test?
getByText(container, (content, element) => element.tagName.toLowerCase() === 'div')try using getByText to match element TagName