Spaces:
Running
Running
| import '@testing-library/jest-dom'; | |
| import { render, screen, waitFor } from '@testing-library/react'; | |
| import App from './App'; | |
| jest.mock('./utils/storage', () => ({ | |
| loadRuns: jest.fn().mockResolvedValue([]), | |
| createRun: jest.fn(), | |
| updateRun: jest.fn(), | |
| deleteRun: jest.fn(), | |
| })); | |
| test('renders running dashboard heading', async () => { | |
| render(<App />); | |
| const heading = screen.getByRole('heading', { name: /running dashboard/i }); | |
| expect(heading).toBeInTheDocument(); | |
| await waitFor(() => | |
| expect(screen.queryByText(/loading shared runs/i)).not.toBeInTheDocument() | |
| ); | |
| }); | |