import * as React from 'react'
import { ToolbarButtonGroup } from './button-group'
import { render } from '@testing-library/react'
import { ToolbarButtonEmpty } from '../button'

describe('ToolbarButtonGroup', () => {
    describe('with null as a child', () => {
        it('should not error', () => {
            const { getByRole } = render(
                <ToolbarButtonGroup groupLabel="Example">
                    {null}
                    <ToolbarButtonEmpty>Button</ToolbarButtonEmpty>
                </ToolbarButtonGroup>
            )

            expect(getByRole('button')).toBeInTheDocument()
        })
    })
})
