import * as React from 'react'; import render from '../../_utils/tests/render'; import Alert from '../Alert'; it('renders correctly', () => { const { container } = render(Alert); expect(container.firstChild).toMatchSnapshot(); }); it('renders correctly with a custom element', () => { const { container } = render( ); expect(container.firstChild).toMatchSnapshot(); }); it('renders correctly when a type prop is set', () => { const { container } = render(Alert); expect(container.firstChild).toMatchSnapshot(); }); it('renders correctly when hasIcon prop is true', () => { const { container } = render( Alert ); expect(container.firstChild).toMatchSnapshot(); }); it('renders correctly when hasIcon prop is true for only a title', () => { const { container } = render(); expect(container.firstChild).toMatchSnapshot(); }); it('renders correctly when a title prop is set', () => { const { container } = render(Alert); expect(container.firstChild).toMatchSnapshot(); }); it('renders correctly when a close button is present', () => { const { container } = render( {}} showCloseButton> Alert ); expect(container.firstChild).toMatchSnapshot(); });