Testing v-model type matching error/warning when using TypeScript #1969
-
I'm testing that a component correctly updates a I followed the documentation for testing const wrapper = mount(Editor, {
props: {
modelValue: 'initialText',
'onUpdate:modelValue': (e) => wrapper.setProps({ modelValue: e })
}
}) The issue is that I get a type warning, because my components (eg: What would be the correct way to handle this type warning properly? Is there any other approach except to use |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
We usually add |
Beta Was this translation helpful? Give feedback.
Hi @LondonAppDev
We usually add
emits: ['update:modelValue'],
to theEditor
component, and I think it should compile properly.If that works as I expect, I'll add a note in the docs 👍