Skip to content

Commit

Permalink
Dominick/ Closes #613 Add unit test for <AlertTitle /> component (#618)
Browse files Browse the repository at this point in the history
Added a unit test to verify that the title prop in `AlertTitle.tsx`
renders correctly when passed as a string.

---------

Co-authored-by: Shashi Lo <[email protected]>
  • Loading branch information
HoldUpFjord and shashilo authored Oct 30, 2024
1 parent 0ac4e38 commit 7d3529e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions components/AlertTItle/AlertTitle.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from 'react';
import { render } from '@testing-library/react';
import { AlertTitle } from './AlertTitle';

describe('AlertTitle', () => {
it('renders the title text', () => {
const { getByText } = render(<AlertTitle title="Test Title" />);
expect(getByText('Test Title')).toBeInTheDocument();
});
});

0 comments on commit 7d3529e

Please sign in to comment.