mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 02:31:21 +00:00
simplify test config (#639)
This commit is contained in:
23
test/specs/tabbar.spec.js
Normal file
23
test/specs/tabbar.spec.js
Normal file
@@ -0,0 +1,23 @@
|
||||
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();
|
||||
});
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user