import { render, screen } from '@testing-library/react';
import Results from './Results';

test('renders voting results', () => {
  const mockVotes = { user1: 5, user2: 8, user3: 5 };
  render(<Results votes={mockVotes} />);
  expect(screen.getByText(/5: 2 vote\(s\)/i)).toBeInTheDocument();
  expect(screen.getByText(/8: 1 vote\(s\)/i)).toBeInTheDocument();
});
