From e12ac1643ad2b31c74a5d42f033c926fee9b4e6b Mon Sep 17 00:00:00 2001 From: Eran Machiels Date: Fri, 5 Feb 2021 09:01:52 +0100 Subject: [PATCH] Changed and removed incorrect tests --- __tests__/suits/Area.test.tsx | 6 +++--- __tests__/suits/Provider.test.tsx | 20 -------------------- 2 files changed, 3 insertions(+), 23 deletions(-) diff --git a/__tests__/suits/Area.test.tsx b/__tests__/suits/Area.test.tsx index 8de4f76..c296e4f 100644 --- a/__tests__/suits/Area.test.tsx +++ b/__tests__/suits/Area.test.tsx @@ -357,7 +357,7 @@ describe('test ValidatorProvider', () => { {({valid}) => ( <> - +
{valid ? 'yes' : 'no'}
)} @@ -366,7 +366,7 @@ describe('test ValidatorProvider', () => { area.find('input').at(0).simulate('blur'); await tick(); - expect(area.find('div').text()).toBe('no'); + expect(area.find('div').text()).toBe('yes'); }); it('should indicate pending while validation is ongoing', async () => { @@ -411,7 +411,7 @@ describe('test ValidatorProvider', () => { it('should indicate touched when input blurred', async () => { const area = mount( - + {({touched}) => ( <> diff --git a/__tests__/suits/Provider.test.tsx b/__tests__/suits/Provider.test.tsx index 57fe1d2..a4aafc0 100644 --- a/__tests__/suits/Provider.test.tsx +++ b/__tests__/suits/Provider.test.tsx @@ -142,24 +142,4 @@ describe('test ValidatorProvider', () => { await tick(); expect(mockFn).toHaveBeenCalled() }); - - it('should indicate whether the area is dirty', async () => { - const provider = mount( - - {({ dirty }) => ( - <> - - - -
{dirty ? 'yes' : 'no'}
- - )} -
- ); - - provider.find('input').at(0).simulate('blur'); - await tick(); - expect(provider.find('div').text()).toBe('no'); - - }) })