import React from 'react'; import { render } from '@testing-library/react-native'; import { Text } from 'react-native'; import ShouldRender from '../ShouldRender'; describe('ShouldRender', () => { it('should render children when condition is true', () => { const { getByText } = render( Hello World ); expect(getByText('Hello World')).toBeTruthy(); }); it('should not render children when condition is false', () => { const { queryByText } = render( Hello World ); expect(queryByText('Hello World')).toBeNull(); }); });