From 71c155f0431fc70190b22dcf3ea66394432e57b4 Mon Sep 17 00:00:00 2001 From: lijianan <574980606@qq.com> Date: Sat, 3 Jun 2023 18:16:28 +0800 Subject: [PATCH] test: add test case (#42800) --- components/divider/__tests__/index.test.tsx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/components/divider/__tests__/index.test.tsx b/components/divider/__tests__/index.test.tsx index 0e581f43b2..367b319105 100644 --- a/components/divider/__tests__/index.test.tsx +++ b/components/divider/__tests__/index.test.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; -import { render } from '../../../tests/utils'; import Divider from '..'; import mountTest from '../../../tests/shared/mountTest'; +import { render } from '../../../tests/utils'; describe('Divider', () => { mountTest(Divider); @@ -10,8 +10,19 @@ describe('Divider', () => { const errSpy = jest.spyOn(console, 'error').mockImplementation(() => {}); const { container } = render(Bamboo); - expect(container.querySelector('.ant-divider-inner-text')).toBeFalsy(); + expect(container.querySelector('.ant-divider-inner-text')).toBeFalsy(); errSpy.mockRestore(); }); + + it('support string orientationMargin', () => { + const { container } = render( + + test test test + , + ); + expect(container?.querySelector('.ant-divider-inner-text')).toHaveStyle({ + marginRight: 10, + }); + }); });