UNPKG

@zohodesk/components

Version:

Dot UI is a customizable React component library built to deliver a clean, accessible, and developer-friendly UI experience. It offers a growing set of reusable components designed to align with modern design systems and streamline application development

20 lines 682 B
import React from 'react'; import { render } from '@testing-library/react'; import Heading from "../Heading"; describe('Heading', () => { test('rendering the defult props', () => { const { asFragment } = render( /*#__PURE__*/React.createElement(Heading, null)); expect(asFragment()).toMatchSnapshot(); }); const whiteSpace = ['normal', 'nowrap', 'pre', 'pre-line', 'pre-wrap', 'break-spaces']; test.each(whiteSpace)('Should render whiteSpace of Heading - %s', whiteSpace => { const { asFragment } = render( /*#__PURE__*/React.createElement(Heading, { whiteSpace: whiteSpace })); expect(asFragment()).toMatchSnapshot(); }); });