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

describe('UiTableFooter', () => {
  test('renders tfoot with custom class', () => {
    const { container } = render(UiTableFooter, {
      props: { class: 'custom-footer' },
      slots: {
        default: '<tr><td>Footer Cell</td></tr>',
      },
    });

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