mirror of
https://github.com/youzan/vant.git
synced 2025-10-22 11:54:02 +00:00
unit tes
This commit is contained in:
@@ -106,10 +106,14 @@ describe('ActionSheet', () => {
|
||||
});
|
||||
|
||||
expect(wrapper.data().currentValue).to.be.false;
|
||||
const eventStub = sinon.stub(wrapper.vm, '$emit');
|
||||
|
||||
wrapper.vm.value = true;
|
||||
wrapper.update();
|
||||
Vue.nextTick(() => {
|
||||
expect(wrapper.data().currentValue).to.be.true;
|
||||
expect(eventStub.calledOnce).to.be.true;
|
||||
expect(eventStub.calledWith('input'));
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user