EmptyCard.spec.tsx 551 B

1234567891011121314151617
  1. import { render, screen } from '@testing-library/react';
  2. import EmptyCard from '../../cards/EmptyCard';
  3. import provideTheme from '../utils/provideTheme';
  4. describe('test empty card component', () => {
  5. it('renders default state', () => {
  6. const emptyText = Math.random().toString();
  7. render(
  8. provideTheme(
  9. <EmptyCard icon={<span className="icon">icon</span>} text={emptyText} />
  10. )
  11. );
  12. expect(screen.queryByText('icon')!.className).toEqual('icon');
  13. expect(screen.queryByText(emptyText)).not.toBeNull();
  14. });
  15. });