[Improvement] add utils test cases (#380)

This commit is contained in:
neverland
2017-12-05 21:32:02 +08:00
committed by GitHub
parent 5a17bc520a
commit df835618b0
9 changed files with 191 additions and 67 deletions

View File

@@ -93,4 +93,16 @@ describe('Uploader', () => {
expect(wrapper.contains('input')).to.equal(true);
expect(wrapper.vm.onValueChange({ target: { files: [new File([], '/Users')] }})).to.equal(undefined);
});
it('unknown resultType', () => {
wrapper = mount(Uploader, {
propsData: {
disabled: false,
resultType: 'xxxx'
}
});
expect(wrapper.contains('input')).to.equal(true);
expect(wrapper.vm.onValueChange({ target: { files: [new File([], '/Users')] }})).to.equal(undefined);
});
});