diff --git a/frontend/libs/studio-components/src/components/StudioAlert/StudioAlert.test.tsx b/frontend/libs/studio-components/src/components/StudioAlert/StudioAlert.test.tsx new file mode 100644 index 00000000000..37055784060 --- /dev/null +++ b/frontend/libs/studio-components/src/components/StudioAlert/StudioAlert.test.tsx @@ -0,0 +1,16 @@ +import React from 'react'; +import { render, screen } from '@testing-library/react'; +import type { StudioAlertProps } from './StudioAlert'; +import { StudioAlert } from './StudioAlert'; + +describe('StudioAlert', () => { + it('should render the component', () => { + renderTestAlert({ severity: 'danger' }); + const studioAlert = screen.getByText('Feil'); + expect(studioAlert).toBeInTheDocument(); + }); +}); + +const renderTestAlert = (props: Partial = {}) => { + render(); +};