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
+5 -5
View File
@@ -5,11 +5,11 @@ test('submit event', async () => {
const onSubmit = jest.fn();
const wrapper = mountForm({
template: `
<van-form @submit="onSubmit">
<van-field name="A" value="bar" />
<van-button native-type="submit" />
</van-form>
`,
<van-form @submit="onSubmit">
<van-field name="A" value="bar" />
<van-button native-type="submit" />
</van-form>
`,
methods: {
onSubmit,
},