import '@testing-library/jest-dom/vitest';
import { render } from '@testing-library/vue';
import { describe, expect, test } from 'vitest';
import UiCardDescription from '../UiCardDescription.vue';

describe('UiCardDescription', () => {
  test('renders with custom class', () => {
    const { container } = render(UiCardDescription, {
      props: { class: 'custom-description' },
      slots: {
        default: 'Card description text',
      },
    });

    const description = container.querySelector(
      '[data-slot="card-description"]',
    );
    expect(description).toBeInTheDocument();
    expect(description).toHaveClass('custom-description');
  });
});
