import { render, screen } from '@testing-library/react' import * as React from 'react' import ListEmpty from './index' describe('ListEmpty Component', () => { describe('Render', () => { it('renders default icon when no icon is provided', () => { const { container } = render() expect(container.querySelector('[data-icon="Variable02"]')).toBeInTheDocument() }) it('renders custom icon when provided', () => { const { container } = render(} />) expect(container.querySelector('[data-icon="Variable02"]')).not.toBeInTheDocument() expect(screen.getByTestId('custom-icon')).toBeInTheDocument() }) it('renders design lines', () => { const { container } = render() const svgs = container.querySelectorAll('svg') expect(svgs).toHaveLength(5) }) }) describe('Props', () => { it('renders title and description correctly', () => { const testTitle = 'Empty List' const testDescription = No items found render() expect(screen.getByText(testTitle)).toBeInTheDocument() expect(screen.getByTestId('desc')).toBeInTheDocument() expect(screen.getByText('No items found')).toBeInTheDocument() }) }) })