Implement stores and refills, improve testing

This commit is contained in:
Aerilyn Weber 2026-04-18 12:36:29 +09:00
parent 9f416903ef
commit 5536acd67d
137 changed files with 21218 additions and 221 deletions

View 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');
});
});