Tests refactor
This commit is contained in:
parent
245520fb50
commit
99134d8556
165 changed files with 911 additions and 531 deletions
|
|
@ -1,22 +0,0 @@
|
|||
import { describe, it, expect, vi } from 'vitest';
|
||||
import { render, screen } from '@testing-library/react';
|
||||
|
||||
vi.mock('next/link', () => ({
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
default: (props: any) => <a href={props.href}>{props.children}</a>,
|
||||
}));
|
||||
|
||||
import HomePage from '../page';
|
||||
|
||||
describe('HomePage', () => {
|
||||
it('renders MeshiTrack heading', () => {
|
||||
render(<HomePage />);
|
||||
expect(screen.getByText('MeshiTrack')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('renders Sign In link to /login', () => {
|
||||
render(<HomePage />);
|
||||
const link = screen.getByRole('link', { name: 'Sign In' });
|
||||
expect(link).toHaveAttribute('href', '/login');
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue