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,24 @@
import { describe, it, expect, vi } from 'vitest';
import { render, screen } from '@testing-library/react';
vi.mock('@/components/layout/Sidebar', () => ({
Sidebar: () => <nav data-testid="sidebar" />,
}));
vi.mock('@/components/layout/TopBar', () => ({
TopBar: () => <div data-testid="topbar" />,
}));
import DashboardLayout from '../layout';
describe('DashboardLayout', () => {
it('renders sidebar, topbar and children', () => {
render(<DashboardLayout>
<div data-testid="child">content</div>
</DashboardLayout>);
expect(screen.getByTestId('sidebar')).toBeInTheDocument();
expect(screen.getByTestId('topbar')).toBeInTheDocument();
expect(screen.getByTestId('child')).toBeInTheDocument();
});
});