Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jondyr committed Oct 17, 2024
1 parent 451746e commit 310ca64
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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<StudioAlertProps> = {}) => {
render(<StudioAlert {...props} />);
};

0 comments on commit 310ca64

Please sign in to comment.