You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
portainer/app/react/components/buttons/ButtonGroup.test.tsx

19 lines
513 B

import { render } from '@testing-library/react';
import { PropsWithChildren } from 'react';
import { ButtonGroup, Props } from './ButtonGroup';
function renderDefault({
size = 'small',
children = 'null',
}: Partial<PropsWithChildren<Props>> = {}) {
return render(<ButtonGroup size={size}>{children}</ButtonGroup>);
}
test('should display a ButtonGroup component', async () => {
const { findByRole } = renderDefault({});
const element = await findByRole('group');
expect(element).toBeTruthy();
});