diff --git a/docs/guide/advanced/v-model.md b/docs/guide/advanced/v-model.md index 89fae4c84..6fb11495d 100644 --- a/docs/guide/advanced/v-model.md +++ b/docs/guide/advanced/v-model.md @@ -49,7 +49,11 @@ test('modelValue should be updated', async () => { const wrapper = mount(Editor, { props: { modelValue: 'initialText', - 'onUpdate:modelValue': (e) => wrapper.setProps({ modelValue: e }) + 'onUpdate:modelValue': async (e) => { + // async/await necessary if modelValue is updated in the setup function + await nextTick() + await wrapper.setProps({ modelValue: e }) + } } })