aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/atoms/links/social-link.test.tsx
blob: e13689cedb9843d74ecf438b254fc85c4fee06ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import { render, screen } from '@tests/utils';
import SocialLink from './social-link';

/**
 * Next.js mock images to use next/image component. So for now, I need to mock
 * the svg files manually.
 */
jest.mock('@assets/images/social-media/github.svg', () => 'svg-file');

describe('SocialLink', () => {
  it('render a social link', () => {
    render(<SocialLink name="Github" url="#" />);
    expect(screen.getByRole('link')).toHaveAccessibleName('Github');
  });
});