react-native-tableview-simple
Version:
React Native component for TableView made with pure CSS
24 lines • 943 B
JavaScript
/* eslint-env node, jest */
import 'react-native';
import React from 'react';
import renderer from 'react-test-renderer';
import Cell from '../Cell';
it('renders with left detail', () => {
const tree = renderer
.create(<Cell cellStyle="LeftDetail" title="LeftDetail" detail="Detail"/>)
.toJSON();
expect(tree).toMatchSnapshot();
});
it('renders with accessory', () => {
const tree = renderer
.create(<Cell cellStyle="LeftDetail" title="LeftDetail" detail="Detail" accessory="DisclosureIndicator"/>)
.toJSON();
expect(tree).toMatchSnapshot();
});
it('renders with accessory and onPressDetailAccessory', () => {
const tree = renderer
.create(<Cell cellStyle="LeftDetail" title="LeftDetail" detail="Detail" accessory="DisclosureIndicator" onPressDetailAccessory={console.log}/>)
.toJSON();
expect(tree).toMatchSnapshot();
});
//# sourceMappingURL=Cell-LeftDetail.test.js.map