[Improvement] optimize find parent mixin (#781)

This commit is contained in:
neverland
2018-03-26 21:20:00 +08:00
committed by GitHub
parent dadf733d71
commit 5497eef5ef
13 changed files with 82 additions and 105 deletions
-1
View File
@@ -14,7 +14,6 @@ describe('ActionSheet', () => {
});
expect(wrapper.hasClass('van-actionsheet')).to.be.true;
expect(wrapper.contains('.van-actionsheet__list')).to.be.true;
expect(wrapper.instance().actions.length).to.equal(0);
expect(wrapper.instance().overlay).to.be.true;
expect(wrapper.instance().closeOnClickOverlay).to.be.true;
+1 -1
View File
@@ -229,7 +229,7 @@ describe('ContactEdit', () => {
const deleteButton = wrapper.find('.van-button')[1];
deleteButton.trigger('click');
wrapper.vm.onDeleteContact();
wrapper.vm.onDelete();
setTimeout(() => {
wrapper.vm.isDeleting = false;
+1 -1
View File
@@ -69,6 +69,7 @@ describe('Field', () => {
it('create a autosize textarea field', (done) => {
wrapper = mount(Field, {
attachToDocument: true,
propsData: {
type: 'textarea',
autosize: {}
@@ -88,7 +89,6 @@ describe('Field', () => {
textareaElement.value = longText;
textarea.trigger('input');
wrapper.update();
setTimeout(() => {
expect(wrapper.find('.van-field__control')[0].element.value).to.equal(longText);
expect(textareaElement.style.height).to.equal((textareaElement.scrollHeight - textAreaDiff) + 'px');