Spaces:
Running
Running
| import { render, screen, waitFor } from '@testing-library/react'; | |
| import App from './App'; | |
| jest.mock('./utils/storage', () => ({ | |
| loadSessions: jest.fn().mockResolvedValue([]), | |
| createSession: jest.fn(), | |
| updateSession: jest.fn(), | |
| deleteSession: jest.fn(), | |
| })); | |
| test('renders climbing dashboard heading', async () => { | |
| render(<App />); | |
| const heading = screen.getByRole('heading', { name: /climbing dashboard/i }); | |
| expect(heading).toBeInTheDocument(); | |
| await waitFor(() => | |
| expect(screen.queryByText(/loading shared sessions/i)).not.toBeInTheDocument() | |
| ); | |
| }); | |