You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When using the .props() method on a VueWrapper for a prop which is not required but has a default value the returned type includes undefined.
I'm actually writing this in the advanced typescript docs here :D
That's caused because the props inferred are the wrong ComponentPublicInstance props, it should be the internal ComponentPublicInstance instead of the rendered props.
Describe the bug
When using the
.props()
method on a VueWrapper for a prop which is not required but has a default value the returned type includesundefined
.To Reproduce
https://github.com/DesselBane/test-utils-reproduction/blob/master/src/components/foo.spec.ts
Expected behavior
I would argue that the type should not include
undefined
since it has a default value and this default value is returned at runtime.Related information:
This happened on an update from v2.4.1 to v2.4.2, most likely somewhere in this PR: #2137 (but I'm not sure)
The text was updated successfully, but these errors were encountered: