We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9e3c112 commit ad72dc1Copy full SHA for ad72dc1
1 file changed
src/__tests__/App.test.jsx
@@ -1,7 +1,13 @@
1
import { render, screen } from '@testing-library/react';
2
import App from '../App';
3
4
-test('renders Home nav link without crashing', () => {
+test('renders first Logo nav link to root ("/")', () => {
5
render(<App />);
6
- expect(screen.getByRole('link', { name: /home/i })).toBeInTheDocument();
+
7
+ const logoLinks = screen.getAllByRole('link', { name: /logo/i });
8
+ expect(logoLinks.length).toBeGreaterThan(0);
9
10
+ const firstLogo = logoLinks[0];
11
+ expect(firstLogo).toBeInTheDocument();
12
+ expect(firstLogo).toHaveAttribute('href', '/');
13
});
0 commit comments