import { render, screen } from '../../test-utils';
import { CloseButton } from '.';
const props = {
className: 'className',
onClick: jest.fn(),
};
describe('CloseButton', () => {
describe('tabIndex', () => {
it('should not have tabIndex by default', () => {
render();
expect(screen.getByRole('button')).not.toHaveAttribute('tabIndex');
});
it('should support tabIndex', () => {
render();
expect(screen.getByRole('button')).toHaveAttribute('tabIndex', '0');
});
});
});