Skip to content

Commit 215b523

Browse files
committed
test: fix test case
1 parent 6e92daf commit 215b523

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/index.test.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,12 @@ describe('rc-checkbox', () => {
120120
expect(inputEl.attributes.value.value).toEqual('6');
121121
});
122122

123-
it('passes title prop to input', () => {
123+
it('passes title prop to wrapper', () => {
124124
const { container } = render(<Checkbox title="my-custom-title" />);
125-
const inputEl = container.querySelector('input')!;
125+
const wrapper = container.querySelector('.rc-checkbox')!;
126126

127127
// @ts-ignore
128-
expect(inputEl.attributes.title.value).toEqual('my-custom-title');
128+
expect(wrapper.attributes.title.value).toEqual('my-custom-title');
129129
});
130130

131131
it('onFocus', () => {

0 commit comments

Comments
 (0)