format import React from 'react' ; import { Text } from 'react-native' ; import { TextView } from '@components' ; import renderer from 'react-test-renderer' ; it ( 'renders correctly' , ( ) => { const instance = renderer . create ( < TextView />); expect ( instance . toJSON ( ) ) . toMatchSnapshot ( ) ; } ) ; it ( 'renders with text' , ( ) => { const instance = renderer . create ( < TextView text = "test" / > ) ; const textView = instance . root . findByType ( Text ) ; expect ( textView . props . children ) . toBe ( 'test' ) ; } ) ;