UNPKG

@zohodesk/dot

Version:

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

28 lines 794 B
import React from 'react'; import { render } from '@testing-library/react'; import Text from "../Text"; describe('Text', () => { const type = ['bold', 'semiBold', 'heading']; test('rendering the defult props', () => { const { asFragment } = render( /*#__PURE__*/React.createElement(Text, null)); expect(asFragment()).toMatchSnapshot(); }); test('rendering the url', () => { const { asFragment } = render( /*#__PURE__*/React.createElement(Text, { url: "www.google.com" })); expect(asFragment()).toMatchSnapshot(); }); test.each(type)('Should render size - %s', type => { const { asFragment } = render( /*#__PURE__*/React.createElement(Text, { type: type })); expect(asFragment()).toMatchSnapshot(); }); });