chore(Tabs): add deprecation warning (#9129)
* chore(Tabs): add deprecation warning * chore: upd * chore: upd
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user