import React from 'react';
import '@testing-library/jest-dom/extend-expect';
import { render } from '@testing-library/react';
import { Avatar } from './Avatar';
describe('Avatar', function () {
  describe('when props are provided', function () {
    var wrapper;
    beforeEach(function () {
      wrapper = render( /*#__PURE__*/React.createElement(Avatar, {
        className: "modifier",
        "data-arbitrary": "arbitrary"
      }, "AB"));
    });
    it('should apply the CSS modifier', function () {
      expect(wrapper.getByText('AB').classList).toContain('modifier');
    });
    it('should spread arbitrary props', function () {
      expect(wrapper.getByText('AB')).toHaveAttribute('data-arbitrary', 'arbitrary');
    });
    it('should render the initials', function () {
      expect(wrapper.getByText('AB')).toBeInTheDocument();
    });
  });
});