@cainiaofe/cn-ui-m
Version:
20 lines (19 loc) • 1.25 kB
JavaScript
import React from 'react';
import { CnTypography } from '../index';
import { render } from '@testing-library/react';
var Caption = CnTypography.Caption, BodyText2 = CnTypography.BodyText2, BodyText1 = CnTypography.BodyText1, H6 = CnTypography.H6, H5 = CnTypography.H5, H4 = CnTypography.H4, H3 = CnTypography.H3, H2 = CnTypography.H2, H1 = CnTypography.H1;
describe('CnTypography', function () {
test('Caption should return the correct value', function () {
var container = render(React.createElement("div", null,
React.createElement(Caption, null, "\u6C34\u5370\u6587\u672C"),
React.createElement(BodyText1, null, "\u6B63\u6587"),
React.createElement(BodyText2, null, "\u6B63\u6587\u5F3A\u8C03"),
React.createElement(H6, null, "\u526F\u6807\u9898"),
React.createElement(H5, null, "\u5E38\u89C4\u6807\u9898"),
React.createElement(H4, null, "\u5927\u6807\u9898"),
React.createElement(H3, null, "\u8FD0\u8425\u6807\u9898-\u5C0F"),
React.createElement(H2, null, "\u8FD0\u8425\u6807\u9898-\u4E2D"),
React.createElement(H1, null, "\u8FD0\u8425\u6807\u9898-\u5927"))).container;
expect(container).toBeInTheDocument();
});
});