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

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

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

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

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

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

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

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