Tab: add test cases

This commit is contained in:
陈嘉涵
2017-09-27 11:05:33 +08:00
parent 37a5c55ddb
commit aaaf569759
2 changed files with 22 additions and 1 deletions

View File

@@ -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();
});
});
});