mirror of
https://github.com/youzan/vant.git
synced 2025-10-18 17:51:54 +00:00
Tab: add test cases
This commit is contained in:
@@ -146,4 +146,15 @@ describe('Tabs', () => {
|
||||
done();
|
||||
}, 1200);
|
||||
});
|
||||
|
||||
it('watch tab props changes', (done) => {
|
||||
wrapper = mount(TabsTestComponent);
|
||||
wrapper.vm.firstTabTitle = '测试标题';
|
||||
wrapper.vm.firstTabDisabled = true;
|
||||
|
||||
wrapper.vm.$nextTick(() => {
|
||||
expect(wrapper.find('.van-tab')[0].text().replace(/\n|\s/g, '')).to.equal('测试标题');
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user