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(