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

describe('UiTable', () => {
  test('renders table with custom class', () => {
    const { getByRole } = render(UiTable, {
      props: { class: 'custom-table' },
      slots: {
        default: '<tbody><tr><td>Cell</td></tr></tbody>',
      },
    });

    const table = getByRole('table');
    expect(table).toBeInTheDocument();
    expect(table).toHaveClass('custom-table');
  });
});
