Implement stores and refills, improve testing
This commit is contained in:
parent
9f416903ef
commit
5536acd67d
137 changed files with 21218 additions and 221 deletions
22
packages/web/src/app/__tests__/page.test.tsx
Normal file
22
packages/web/src/app/__tests__/page.test.tsx
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
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