From c2e3931a630ac7800f773d76af690b4bc20d20de Mon Sep 17 00:00:00 2001 From: Youssouf EL Azizi Date: Wed, 13 Mar 2024 15:46:10 +0000 Subject: [PATCH] refactor: add missed scenarios for inputs --- setup.ts | 1 - src/ui/button.test.tsx | 11 ++++++++++- src/ui/input.test.tsx | 16 ++++++++++++++++ 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/setup.ts b/setup.ts index 8640f2ee..fe674494 100644 --- a/setup.ts +++ b/setup.ts @@ -1,4 +1,3 @@ -import '@testing-library/react-native/extend-expect'; // react-hook form setup for testing // @ts-ignore global.window = {}; diff --git a/src/ui/button.test.tsx b/src/ui/button.test.tsx index 875033cd..2d6d429b 100644 --- a/src/ui/button.test.tsx +++ b/src/ui/button.test.tsx @@ -1,5 +1,6 @@ /* eslint-disable max-lines-per-function */ import React from 'react'; +import { Text } from 'react-native'; import { cleanup, fireEvent, render, screen } from '@/core/test-utils'; @@ -9,9 +10,17 @@ afterEach(cleanup); describe('Button component ', () => { it('should render correctly ', () => { - render( + ); + expect(screen.getByText('Custom child')).toBeOnTheScreen(); + }); it('should render the label correctly', () => { render(