| Total Complexity | 2 |
| Complexity/F | 1 |
| Lines of Code | 15 |
| Function Count | 2 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import '@testing-library/jest-dom/extend-expect'; |
||
| 2 | import {screen, render} from '@testing-library/svelte'; |
||
| 3 | import Loader from './Loader.svelte'; |
||
| 4 | |||
| 5 | it('renders nothing when not loading footer', () => { |
||
| 6 | render(Loader, {loading: false}); |
||
| 7 | |||
| 8 | expect(screen.queryByRole('status')).not.toBeInTheDocument(); |
||
| 9 | }); |
||
| 10 | |||
| 11 | it('renders loader on loading', () => { |
||
| 12 | render(Loader, {loading: true}); |
||
| 13 | |||
| 14 | expect(screen.getByRole('status')).toBeInTheDocument(); |
||
| 15 | }); |
||
| 16 |