mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 02:31:21 +00:00
支持SSR、升级Vue版本和增加新的icon (#40)
* search component add new style * update vue version and support ssr * unit test * add new icon * new icon
This commit is contained in:
@@ -53,7 +53,7 @@ describe('Switch', () => {
|
||||
});
|
||||
|
||||
expect(wrapper.hasClass('van-switch--on')).to.be.true;
|
||||
wrapper.simulate('click');
|
||||
wrapper.trigger('click');
|
||||
expect(wrapper.hasClass('van-switch--on')).to.be.true;
|
||||
});
|
||||
|
||||
@@ -77,7 +77,7 @@ describe('Switch', () => {
|
||||
});
|
||||
|
||||
expect(wrapper.hasClass('van-switch--off')).to.be.true;
|
||||
wrapper.simulate('click');
|
||||
wrapper.trigger('click');
|
||||
expect(wrapper.hasClass('van-switch--off')).to.be.true;
|
||||
});
|
||||
|
||||
@@ -89,7 +89,7 @@ describe('Switch', () => {
|
||||
});
|
||||
|
||||
expect(wrapper.hasClass('van-switch--off')).to.be.true;
|
||||
wrapper.simulate('click');
|
||||
wrapper.trigger('click');
|
||||
expect(wrapper.hasClass('van-switch--on')).to.be.true;
|
||||
});
|
||||
|
||||
@@ -103,7 +103,7 @@ describe('Switch', () => {
|
||||
});
|
||||
|
||||
expect(wrapper.hasClass('van-switch--off')).to.be.true;
|
||||
wrapper.simulate('click');
|
||||
wrapper.trigger('click');
|
||||
expect(wrapper.hasClass('van-switch--off')).to.be.true;
|
||||
expect(stub.calledOnce).to.be.true;
|
||||
expect(stub.calledWith(true));
|
||||
|
Reference in New Issue
Block a user