import { render } from '@testing-library/react'; import '@testing-library/jest-dom'; import { GradientFlow } from './gradient-flow'; jest.mock('framer-motion', () => ({ motion: { div: ({ className }: { className?: string }) =>
, }, })); describe('GradientFlow', () => { beforeEach(() => { jest.clearAllMocks(); }); describe('Rendering', () => { it('should render gradient flow component', () => { const { getByTestId } = render(); const component = getByTestId('gradient-flow'); expect(component).toBeInTheDocument(); }); it('should apply custom className', () => { const { getByTestId } = render(); const component = getByTestId('gradient-flow'); expect(component).toHaveClass('custom-class'); }); }); describe('Props', () => { it('should accept custom colors', () => { const { getByTestId } = render( ); const component = getByTestId('gradient-flow'); expect(component).toBeInTheDocument(); }); it('should accept custom duration', () => { const { getByTestId } = render(); const component = getByTestId('gradient-flow'); expect(component).toBeInTheDocument(); }); }); });