import React, { useEffect, useRef, useState } from 'react';
import renderer from 'react-test-renderer';
import { Form } from '@devesharp/unform-web';
import 'jest-styled-components';
import { MaskText } from '.';

it('renderizar RG', () => {
   const tree = renderer.create(<MaskText value="365882021" mask="RG" />).toJSON();
   expect(tree).toMatchSnapshot();
});

it('renderizar CPF', () => {
   const tree = renderer.create(<MaskText value="11281519114" mask="CPF" />).toJSON();
   expect(tree).toMatchSnapshot();
});

it('renderizar Numero', () => {
   const tree = renderer.create(<MaskText value="11a28151911d- 412" mask="number" />).toJSON();
   expect(tree).toMatchSnapshot();
});

it('renderizar CEP', () => {
   const tree = renderer.create(<MaskText value="01717115" mask="CEP" />).toJSON();
   expect(tree).toMatchSnapshot();
});

it('renderizar CNPJ', () => {
   const tree = renderer.create(<MaskText value="26576255000191" mask="CNPJ" />).toJSON();
   expect(tree).toMatchSnapshot();
});

it('renderizar NoSpace', () => {
   const tree = renderer.create(<MaskText value="265 76 25 50 00191" mask="no-spaces" />).toJSON();
   expect(tree).toMatchSnapshot();
});

it('renderizar Phone', () => {
   const tree = renderer.create(<MaskText value="11913617518" mask="phone" />).toJSON();
   expect(tree).toMatchSnapshot();
});
