Skip to content

Commit 6bdbc87

Browse files
authored
Update documentation for v-model testing
See the following issue: #2693
1 parent 5a45204 commit 6bdbc87

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

docs/guide/advanced/v-model.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,11 @@ test('modelValue should be updated', async () => {
4949
const wrapper = mount(Editor, {
5050
props: {
5151
modelValue: 'initialText',
52-
'onUpdate:modelValue': (e) => wrapper.setProps({ modelValue: e })
52+
'onUpdate:modelValue': async (e) => {
53+
// async/await necessary if modelValue is updated in the setup function
54+
await nextTick()
55+
await wrapper.setProps({ modelValue: e })
56+
}
5357
}
5458
})
5559

0 commit comments

Comments
 (0)