[improvement] Actionsheet: add cancel event (#796)

This commit is contained in:
张敏
2018-03-29 11:43:21 +08:00
committed by GitHub
parent 99361427f9
commit 1c2b45503e
5 changed files with 29 additions and 3 deletions
+5
View File
@@ -107,6 +107,11 @@ describe('ActionSheet', () => {
const cancelButton = wrapper.find('.van-actionsheet__cancel')[0];
expect(wrapper.contains('.van-actionsheet__cancel')).to.be.true;
expect(cancelButton.text()).to.equal('cancel');
const eventStub = sinon.stub(wrapper.vm, '$emit');
cancelButton.trigger('click');
expect(eventStub.calledWith('cancel'));
});
it('toggle actionsheet value from v-model', (done) => {