mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-01-04 03:48:03 -05:00
18 lines
777 B
TypeScript
18 lines
777 B
TypeScript
import { render, screen } from '@testing-library/react';
|
|
import LoadingSpinner from '../lib/client/LoadingSpinner';
|
|
|
|
describe('LoadingSpinner', () => {
|
|
it('renders a loading spinner', () => {
|
|
render(<LoadingSpinner />);
|
|
|
|
// Check if the spinner container is rendered with the correct classes
|
|
const spinnerContainer = screen.getByTestId('spinner-container');
|
|
expect(spinnerContainer).toBeInTheDocument();
|
|
expect(spinnerContainer).toHaveClass('flex', 'items-center', 'justify-center', 'min-h-screen');
|
|
|
|
// Check if the spinner has the correct classes
|
|
const spinner = screen.getByTestId('spinner');
|
|
expect(spinner).toHaveClass('w-12', 'h-12', 'border-4', 'border-gray-300', 'border-t-gray-800', 'rounded-full', 'animate-spin');
|
|
});
|
|
});
|