import React, { useState } from 'react';
import renderer from 'react-test-renderer';
import { InitialsAvatar } from './index';
import 'jest-styled-components';

it('snapshot - padrão', () => {
   const tree = renderer
      .create(
         <>
            <InitialsAvatar name="John" />
         </>,
      )
      .toJSON();
   expect(tree).toMatchSnapshot();
});

it('snapshot - vários tamanhos', () => {
   const tree = renderer
      .create(
         <>
            <InitialsAvatar name="Notorious Chase" size="xs" />
            <InitialsAvatar name="Made Heaven" size="s" />
            <InitialsAvatar name="Star Platinum" size="m" />
            <InitialsAvatar name="Crazy Diamond" size="l" />
            <InitialsAvatar name="King crimson" size="xl" />
         </>,
      )
      .toJSON();

   expect(tree).toMatchSnapshot();
});

it('snapshot - tamanho customizado', () => {
   const tree = renderer
      .create(
         <>
            <InitialsAvatar name="veronica" sizeCircle={52} />
         </>,
      )
      .toJSON();

   expect(tree).toMatchSnapshot();
});
