-
Notifications
You must be signed in to change notification settings - Fork 245
-
Notifications
You must be signed in to change notification settings - Fork 245
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
Feature request: Testing Vue3 computed properties with TypeScript SFC #1791
Comments
You can access everything on the vm object, even if it is not exposed, as we enable this in VTU. The issue is that TS will complain about it, but you can simply cast the VM object to remove the error. There is sadly nothing we can do in VTU for now, as we're waiting for changes in Vue itself to get the proper types. You can subscribe to #972 to follow the progress. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, I came across this link from stackoverflow, searching from time to time on how to access the properties created, using the vm object.
Sometimes I find an alternative to avoid this problem, but other times I am a little stuck, and using the defineExpose just for testing purposes is a little weird, besides the solution described on the link about typing the wrapper I don't know if it is the best solution for all the cases.
The text was updated successfully, but these errors were encountered: