Skip to content

Commit

Permalink
test: coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieJ committed Aug 3, 2022
1 parent eaa65a1 commit 63a78c8
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions tests/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,32 @@ describe('Tabs.Basic', () => {
expect(wrapper.render()).toMatchSnapshot();
});

it('disabled not change', () => {
const onChange = jest.fn();

const wrapper = mount(
getTabs({
defaultActiveKey: 'light',
items: [
{
label: 'light',
key: 'light',
children: 'Light',
},
{
label: 'disabled',
key: 'disabled',
children: 'Disabled',
disabled: true,
},
],
}),
);

wrapper.find('.rc-tabs-tab-disabled').simulate('click');
expect(onChange).not.toHaveBeenCalled();
});

it('Skip invalidate children', () => {
const wrapper = mount(
getTabs({
Expand Down

0 comments on commit 63a78c8

Please sign in to comment.