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

describe('UiTableCaption', () => {
  test('renders caption with custom class', () => {
    const { container } = render(UiTableCaption, {
      props: { class: 'custom-caption' },
      slots: {
        default: 'Table Caption',
      },
    });

    const caption = container.querySelector('caption');
    expect(caption).toBeInTheDocument();
    expect(caption).toHaveClass('custom-caption');
  });
});
