mirror of
https://github.com/youzan/vant.git
synced 2025-10-18 17:51:54 +00:00
fix bugs and add new features (#25)
* fix bugs and add new features * add unit test * fix tab/tag/datetime-picker bugs
This commit is contained in:
@@ -68,4 +68,10 @@ describe('Tabs', () => {
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
it('check animation duration', () => {
|
||||
wrapper = mount(TabsTestComponent);
|
||||
|
||||
expect(wrapper.style.transitionDuration != '').to.be.true;
|
||||
});
|
||||
});
|
||||
|
29
test/unit/specs/tag.spec.js
Normal file
29
test/unit/specs/tag.spec.js
Normal file
@@ -0,0 +1,29 @@
|
||||
import Tag from 'packages/tag';
|
||||
import { mount } from 'avoriaz';
|
||||
|
||||
describe('Tag', () => {
|
||||
let wrapper;
|
||||
afterEach(() => {
|
||||
wrapper && wrapper.destroy();
|
||||
});
|
||||
|
||||
it('create without typeProps', () => {
|
||||
wrapper = mount(Tag);
|
||||
});
|
||||
|
||||
it('create with right typeProps', () => {
|
||||
wrapper = mount(Tag, {
|
||||
propsData: {
|
||||
type: 'primary'
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
it('create with wrong typeProps', () => {
|
||||
wrapper = mount(Tag, {
|
||||
propsData: {
|
||||
type: 'wrong'
|
||||
}
|
||||
})
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user