UNPKG

@zohodesk/components

Version:

In this Package, we Provide Some Basic Components to Build Web App

46 lines 1.59 kB
import React from 'react'; import { render } from '@testing-library/react'; import ListItemWithCheckBox from "../ListItemWithCheckBox"; describe('ListItemWithCheckBox', () => { test('rendering the defult props', () => { const { asFragment } = render( /*#__PURE__*/React.createElement(ListItemWithCheckBox, null)); expect(asFragment()).toMatchSnapshot(); }); test('ListItemWithCheckBox with secondaryValue', () => { const { asFragment } = render( /*#__PURE__*/React.createElement(ListItemWithCheckBox, { secondaryValue: "secondaryValue" })); expect(asFragment()).toMatchSnapshot(); }); test('ListItemWithCheckBox with secondaryValue text and LHS align start', () => { const { asFragment } = render( /*#__PURE__*/React.createElement(ListItemWithCheckBox, { secondaryValue: "secondaryValue", lhsAlignContent: "start" })); expect(asFragment()).toMatchSnapshot(); }); test('ListItemWithCheckBox with secondaryValue text and LHS align center', () => { const { asFragment } = render( /*#__PURE__*/React.createElement(ListItemWithCheckBox, { secondaryValue: "secondaryValue", lhsAlignContent: "center" })); expect(asFragment()).toMatchSnapshot(); }); test('ListItemWithCheckBox with secondaryValue text and LHS align end', () => { const { asFragment } = render( /*#__PURE__*/React.createElement(ListItemWithCheckBox, { secondaryValue: "secondaryValue", lhsAlignContent: "end" })); expect(asFragment()).toMatchSnapshot(); }); });