UNPKG

@zohodesk/dot

Version:

In this Library, we Provide Some Basic Components to Build Your Application

29 lines 890 B
import React from 'react'; import { render } from '@testing-library/react'; import CheckBoxField from "../CheckBoxField"; describe('CheckBoxField', () => { test('rendering the defult props', () => { const { asFragment } = render( /*#__PURE__*/React.createElement(CheckBoxField, null)); expect(asFragment()).toMatchSnapshot(); }); test('rendering the custom children', () => { const { asFragment } = render( /*#__PURE__*/React.createElement(CheckBoxField, null, "custom children")); expect(asFragment()).toMatchSnapshot(); }); test('rendering the custom label children via renderLabelProps', () => { const { asFragment } = render( /*#__PURE__*/React.createElement(CheckBoxField, { renderLabelProps: { end: () => { return '{}'; } } })); expect(asFragment()).toMatchSnapshot(); }); });