I have a class called button-group that is rendered like this:
<body>
<div>
<span
class="button-group"
/>
</div>
</body>
Now, How do I check/query for the presence of the button-group class? I have written:
const { container } = render( <ButtonGroup /> );
expect( container.firstChild.toHaveClass( 'button-group' ) );
But this test is failing for some reason, thank you.
expect(container.firstChild).toHaveClass( 'button-group' )