Files
flyer-crawler.projectium.com/src/components/LoadingSpinner.test.tsx
Torben Sorensen 19885a50f7
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 13m30s
unit test auto-provider refactor
2026-01-01 23:12:32 -08:00

23 lines
915 B
TypeScript

// src/components/LoadingSpinner.test.tsx
import React from 'react';
import { describe, it, expect } from 'vitest';
import { LoadingSpinner } from './LoadingSpinner';
import { renderWithProviders } from '../tests/utils/renderWithProviders';
describe('LoadingSpinner (in components)', () => {
it('should render the SVG with animation classes', () => {
const { container } = renderWithProviders(<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 } = renderWithProviders(<LoadingSpinner />);
const circle = container.querySelector('circle');
const path = container.querySelector('path');
expect(circle).toBeInTheDocument();
expect(path).toBeInTheDocument();
});
});