import { render, screen } from '@testing-library/react'; import { Tr } from './Tr'; import { expect, describe, it } from 'vitest'; describe('Tr', () => { it('renders a table row with the correct id and class name', () => { render(
); const tr = screen.getByRole('row'); expect(tr).toHaveClass('lunatic-table-tr', 'highlighted-row'); }); it('renders the children components', () => { render( Cell 1,1 Cell 1,2 ); const cell1 = screen.getByText('Cell 1,1'); const cell2 = screen.getByText('Cell 1,2'); expect(cell1).toBeInTheDocument(); expect(cell2).toBeInTheDocument(); }); });