-
Notifications
You must be signed in to change notification settings - Fork 669
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
data() unreachable for components using Vuelidate #795
Comments
I'm trying to understand your reproduction, but I can't follow. The two tests that it contains seems to be meant to pass if said error is thrown, but they fail for some other error. Not good for a reproduction. But I tried to investigate nonetheless.
This is not related to vue-test-utils in any way. If you do the following in main.js you get the same error: const main = new Vue({
el: "#app",
components: { App },
template: '<App ref="app"/>'
});
console.log(main.$refs.app.$options.data()) ...while the following works: const main = new Vue({
el: "#app",
components: { App },
template: '<App ref="app"/>'
});
console.log(main.$refs.app.$options.data.call(main.$refs.app)) |
Thank you for having had a look on this issue. (BTW, I modified the reproduction to expect the test to work) Thanks! |
Version
1.0.0-beta.18
Reproduction link
https://codesandbox.io/s/5lrvnoynx
Steps to reproduce
When upgrading from
1.0.0-beta.17
(up to1.0.0-beta.20
I tried), all my components that usevuelidate
are unable to reachdata()
. If I try and test if the initial values are correctly set, I get an error message.What is expected?
the properties of
vm.$options.data()
should be available for testingWhat is actually happening?
data()
cannot be reachedThe text was updated successfully, but these errors were encountered: