import { describe, expect, it } from '@jest/globals'; import { render, screen as rtlScreen } from '@testing-library/react'; import { NavLink } from './nav-link'; describe('NavLink', () => { it('renders a link', () => { const label = 'eius'; const target = '#harum'; render(); expect(rtlScreen.getByRole('link', { name: label })).toHaveAttribute( 'href', target ); }); it('can render a nav link with stacked contents', () => { const label = 'eius'; const target = '#harum'; render(); expect(rtlScreen.getByRole('link', { name: label })).toHaveClass( 'link--stack' ); }); }); class='main'>index : www.armandphilippot.com
The frontend of my personal website.Armand Philippot
aboutsummaryrefslogtreecommitdiffstats
blob: f2a884f3f9a335e8739b0d032818197ea18bf00f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15