mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
24 lines
558 B
JavaScript
24 lines
558 B
JavaScript
import TabbarExample from '../components/tabbar';
|
|
import { mount } from 'avoriaz';
|
|
|
|
describe('Progress', () => {
|
|
let wrapper;
|
|
|
|
afterEach(() => {
|
|
wrapper && wrapper.destroy();
|
|
});
|
|
|
|
it('Tabbar with four items', (done) => {
|
|
wrapper = mount(TabbarExample);
|
|
|
|
wrapper.vm.$nextTick(() => {
|
|
expect(wrapper.find('.van-tabbar-item').length).to.equal(4);
|
|
|
|
wrapper.find('.van-tabbar-item')[3].element.click();
|
|
expect(wrapper.vm.active).to.equal(3);
|
|
expect(wrapper.vm.changeRecord).to.equal(3);
|
|
done();
|
|
});
|
|
});
|
|
});
|