test(Form): improve test coverage

This commit is contained in:
陈嘉涵
2020-02-14 10:53:47 +08:00
parent 2e927ec2e4
commit 6bbeed7dd1
7 changed files with 108 additions and 15 deletions
+14
View File
@@ -300,3 +300,17 @@ test('name prop', () => {
});
expect(wrapper).toMatchSnapshot();
});
test('call focus method before mounted', done => {
mount(Field, {
created() {
this.focus();
this.blur();
done();
},
});
});
test('destroy field', () => {
mount(Field).destroy();
});