import React from 'react';
import { render } from '@testing-library/react';
import 'jest-styled-components';
import { convertStringToDate } from '../../services';
import { DateString } from './DateString';

it('converter data para string', () => {
   const { container } = render(
      <div>
         <DateString date={convertStringToDate('20201212')} format="dd MM yyyy" />
      </div>,
   );

   expect(container.firstElementChild.innerHTML).toEqual('12 12 2020');
});
