Skip to content

Commit

Permalink
test: fix test case
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed Jun 14, 2023
1 parent 6e92daf commit 215b523
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,12 @@ describe('rc-checkbox', () => {
expect(inputEl.attributes.value.value).toEqual('6');
});

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

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

it('onFocus', () => {
Expand Down

0 comments on commit 215b523

Please sign in to comment.