From 6bdbc87e6cf8d89140d37a07e29c7acb275773c7 Mon Sep 17 00:00:00 2001 From: souserge <15277406+souserge@users.noreply.github.com> Date: Thu, 31 Jul 2025 11:05:08 +0200 Subject: [PATCH] Update documentation for v-model testing See the following issue: https://github.com/vuejs/test-utils/issues/2693 --- docs/guide/advanced/v-model.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 }) + } } })