import React from 'react';
import { render } from '@testing-library/react';
import SellingPoints from './index';

describe('SellingPoints', () => {
  it('renders a list of selling points', () => {
    const sellingPoints = [{ name: 'Point 1' }, { name: 'Point 2' }, { name: 'Point 3' }];
    const { getAllByRole } = render(<SellingPoints sellingPoints={sellingPoints} />);
    const sellingPointsElements = getAllByRole('listitem');
    expect(sellingPointsElements).toHaveLength(sellingPoints.length);
    sellingPointsElements.forEach((element, index) => {
      expect(element).toHaveTextContent(sellingPoints[index].name);
    });
  });
});
