chore(Tabs): add deprecation warning (#9129)

* chore(Tabs): add deprecation warning

* chore: upd

* chore: upd
This commit is contained in:
neverland
2021-07-28 09:33:28 +08:00
committed by GitHub
parent a505a9a266
commit b7e6e68a92
5 changed files with 30 additions and 28 deletions
-21
View File
@@ -2,27 +2,6 @@ import { mount, later } from '../../../test';
import { Tab } from '..';
import { Tabs } from '../../tabs';
test('should emit click event when tab is clicked', async () => {
const onClick = jest.fn();
const wrapper = mount({
render() {
return (
<Tabs onClick={onClick}>
<Tab title="title1">1</Tab>
<Tab title="title2">2</Tab>
</Tabs>
);
},
});
await later();
const tabs = wrapper.findAll('.van-tab');
await tabs[0].trigger('click');
expect(onClick).toHaveBeenCalledWith(0, 'title1');
});
test('should emit click-tab event when tab is clicked', async () => {
const onClickTab = jest.fn();