diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-04-01 17:11:25 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-04-01 17:22:39 +0200 |
| commit | 163f9dc0fe436b708de4e59999e87005c6685a0f (patch) | |
| tree | 34f25b014b606f88976710e622cda7eb38e2dd49 /src/components/atoms/links/social-link.test.tsx | |
| parent | 2385ec8ca0963306f6b87564467301cb5a2a1834 (diff) | |
chore: add a social link component
Diffstat (limited to 'src/components/atoms/links/social-link.test.tsx')
| -rw-r--r-- | src/components/atoms/links/social-link.test.tsx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/components/atoms/links/social-link.test.tsx b/src/components/atoms/links/social-link.test.tsx new file mode 100644 index 0000000..f49fb5a --- /dev/null +++ b/src/components/atoms/links/social-link.test.tsx @@ -0,0 +1,15 @@ +import { render, screen } from '@test-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'); + }); +}); |
