diff --git a/src/components/atoms/Award/Award.test.tsx b/src/components/atoms/Award/Award.test.tsx new file mode 100644 index 0000000..6e39e40 --- /dev/null +++ b/src/components/atoms/Award/Award.test.tsx @@ -0,0 +1,44 @@ +import { render, screen } from '@testing-library/react' +import { Box } from '@mui/material' + +import Award from './Award' + +describe('Award component', () => { + const mockProps = { + year: '2022', + title: 'Test Award', + organization: 'Test Organization', + location: 'Test Location', + titleProps: { color: 'text.primary' }, + sx: { color: 'text.secondary' }, + } + + it('renders without crashing', () => { + render() + }) + + it('displays the correct year', () => { + render() + expect(screen.getByText(mockProps.year)).toBeInTheDocument() + }) + + it('displays the correct title', () => { + render() + expect(screen.getByText(mockProps.title)).toBeInTheDocument() + }) + + it('displays the correct organization', () => { + render() + expect(screen.getByText(mockProps.organization)).toBeInTheDocument() + }) + + it('displays the correct location', () => { + render() + expect(screen.getByText(mockProps.location)).toBeInTheDocument() + }) + + it('renders with the correct component', () => { + const { container } = render() + expect(container.firstChild!.nodeName).toBe('DIV') + }) +})