Files
flyer-crawler.projectium.com/src/components/LoadingSpinner.test.tsx

23 lines
864 B
TypeScript

// src/components/LoadingSpinner.test.tsx
import React from 'react';
import { render } from '@testing-library/react';
import { describe, it, expect } from 'vitest';
import { LoadingSpinner } from './LoadingSpinner';
describe('LoadingSpinner (in components)', () => {
it('should render the SVG with animation classes', () => {
const { container } = render(<LoadingSpinner />);
const svgElement = container.querySelector('svg');
expect(svgElement).toBeInTheDocument();
expect(svgElement).toHaveClass('animate-spin');
});
it('should contain the correct SVG paths for the spinner graphic', () => {
const { container } = render(<LoadingSpinner />);
const circle = container.querySelector('circle');
const path = container.querySelector('path');
expect(circle).toBeInTheDocument();
expect(path).toBeInTheDocument();
});
});