Spaces:
Sleeping
Sleeping
Download src/App.test.js from lewtun/climbing-dashboard: direct link, hf CLI and curl.
- Browser
- Download file 578 Bytes
-
https://huggingface.co/spaces/lewtun/climbing-dashboard/resolve/main/src/App.test.js
- Command line
-
hf download hf://spaces/lewtun/climbing-dashboard/src/App.test.js
-
curl -L -o App.test.js https://huggingface.co/spaces/lewtun/climbing-dashboard/resolve/main/src/App.test.js
578 Bytes
| 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() | |
| ); | |
| }); | |