import * as React from 'react'; import { StyleSheet } from 'react-native'; import { Text, View } from 'react-native'; import renderer from 'react-test-renderer'; import { red500 } from '../../styles/themes/v2/colors'; import Chip from '../Chip/Chip'; import ListIcon from '../List/ListIcon'; import ListItem from '../List/ListItem'; const styles = StyleSheet.create({ title: { fontSize: 20, }, description: { color: red500, }, }); it('renders list item with title and description', () => { const tree = renderer .create( ) .toJSON(); expect(tree).toMatchSnapshot(); }); it('renders list item with left item', () => { const tree = renderer .create( } /> ) .toJSON(); expect(tree).toMatchSnapshot(); }); it('renders list item with right item', () => { const tree = renderer .create( GG} />) .toJSON(); expect(tree).toMatchSnapshot(); }); it('renders list item with left and right items', () => { const tree = renderer .create( GG} right={(props) => } /> ) .toJSON(); expect(tree).toMatchSnapshot(); }); it('renders list item with custom title and description styles', () => { const tree = renderer .create( ) .toJSON(); expect(tree).toMatchSnapshot(); }); it('renders list item with custom description', () => { const tree = renderer .create( ( React Native Paper is a high-quality, standard-compliant Design Design library that has you covered in all major use-cases. {}}> DOCS.pdf )} /> ) .toJSON(); expect(tree).toMatchSnapshot(); }); it('renders with a description with typeof number', () => { const tree = renderer .create( ) .toJSON(); expect(tree).toMatchSnapshot(); });