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

54 lines 1.63 kB
import React from 'react'; import { render } from '@testing-library/react'; import Stencils from "../Stencils.js"; describe('Stencils', () => { test('rendering the defult props', () => { const { asFragment } = render( /*#__PURE__*/React.createElement(Stencils, null)); expect(asFragment()).toMatchSnapshot(); }); const palette = ['primary', 'secondary', 'dark']; test.each(palette)('rendering the palette of- %s', palette => { const { asFragment } = render( /*#__PURE__*/React.createElement(Stencils, { palette: palette })); expect(asFragment()).toMatchSnapshot(); }); const shape = ['rect', 'circle', 'square']; test.each(shape)('rendering the shape of- %s', shape => { const { asFragment } = render( /*#__PURE__*/React.createElement(Stencils, { shape: shape })); expect(asFragment()).toMatchSnapshot(); }); const size = ['small', 'medium', 'large', 'default']; test.each(size)('rendering the size of- %s', size => { const { asFragment } = render( /*#__PURE__*/React.createElement(Stencils, { size: size })); expect(asFragment()).toMatchSnapshot(); }); test('rendering without animation', () => { const { asFragment } = render( /*#__PURE__*/React.createElement(Stencils, { isAnimated: false })); expect(asFragment()).toMatchSnapshot(); }); test('rendering the customClass', () => { const { asFragment } = render( /*#__PURE__*/React.createElement(Stencils, { customClass: "StencilsCustomClass" })); expect(asFragment()).toMatchSnapshot(); }); });