-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Write unit tests for Nav component
- Loading branch information
1 parent
6b72fd8
commit 0112383
Showing
3 changed files
with
18 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { render, screen } from '@testing-library/react'; | ||
import { Nav } from './nav'; | ||
|
||
describe('<Nav />', () => { | ||
it('Should render an anchor', () => { | ||
render(<Nav />); | ||
const anchor = screen.getByRole('link'); | ||
expect(anchor).toBeInTheDocument(); | ||
}); | ||
it('Should render a heading', () => { | ||
render(<Nav />); | ||
const heading = screen.getByRole('heading', { | ||
level: 1, | ||
}); | ||
expect(heading).toBeInTheDocument(); | ||
}); | ||
}); |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters