This commit is contained in:
cookfront
2017-04-12 20:19:24 +08:00
parent 5c389968f7
commit 85fe17deaf
2 changed files with 4 additions and 7 deletions

View File

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