-
Notifications
You must be signed in to change notification settings - Fork 257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix set data reactive #540
Conversation
{}, | ||
{}, | ||
{ field: number | null }, | ||
{ isFieldNull: any } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately the type for this is not exported. I thought we had some way to type computed
properties and vm
🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't use the Options API, so I don't know... Shouldn't it be boolean
though?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to VS Code it should be Computed<boolean>
or something like that, but it is not exported from Vue. I shouldn't actually need to specify this here, but if I don't TS complains.
I have not used TS with Options API before so I have no idea 🤷♂️
{}, | ||
{}, | ||
{ field: number | null }, | ||
{ isFieldNull: any } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't use the Options API, so I don't know... Shouldn't it be boolean
though?
tests/setData.spec.ts
Outdated
@@ -123,4 +123,45 @@ describe('setData', () => { | |||
'Cannot add property count' | |||
) | |||
}) | |||
|
|||
it('https://github.com/vuejs/vue-test-utils-next/issues/538', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
super nit: I prefer when we have a readable test name instead of just a link to a Github issue (easier to understand when the test is failing)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I'll update
Make data via mounting option reactive.
Closes #538