From d6d18daff317086aab55a5a2e32ec5b7b1bc28ec Mon Sep 17 00:00:00 2001 From: zhouzheng Date: Tue, 3 Jan 2023 17:26:40 +0800 Subject: [PATCH] =?UTF-8?q?test:=20=E6=B7=BB=E5=8A=A0CheckBox=E6=B5=8B?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test-ci/src/__tests__/ChecedBox.tsx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 test-ci/src/__tests__/ChecedBox.tsx diff --git a/test-ci/src/__tests__/ChecedBox.tsx b/test-ci/src/__tests__/ChecedBox.tsx new file mode 100644 index 000000000..9951664c2 --- /dev/null +++ b/test-ci/src/__tests__/ChecedBox.tsx @@ -0,0 +1,17 @@ +import CheckBox from '../lib/CheckBox'; +import renderer from 'react-test-renderer'; +import { bool } from 'prop-types'; + +it('CheckBox', () => { + // const component = TestRenderer.create(Radio); + const component = renderer.create( + + 按钮 + , + ); + expect(component.root.props.color).toBe('red'); + expect(component.root.props.checkedIcon).toBe('circle'); + expect(component.root.props.unCheckedIcon).toBe('error'); + expect(component.root.props.checked).toBeTruthy(); + expect(component.root.props.textStyle).toMatchObject({ fontSize: 20 }); +});