{"action":"created","issue":{"url":"https://api.github.com/repos/vuejs/vue-test-utils/issues/795","repository_url":"https://api.github.com/repos/vuejs/vue-test-utils","labels_url":"https://api.github.com/repos/vuejs/vue-test-utils/issues/795/labels{/name}","comments_url":"https://api.github.com/repos/vuejs/vue-test-utils/issues/795/comments","events_url":"https://api.github.com/repos/vuejs/vue-test-utils/issues/795/events","html_url":"https://github.com/vuejs/vue-test-utils/issues/795","id":337832011,"node_id":"MDU6SXNzdWUzMzc4MzIwMTE=","number":795,"title":"data() unreachable for components using Vuelidate","user":{"login":"SzNagyMisu","id":25562614,"node_id":"MDQ6VXNlcjI1NTYyNjE0","avatar_url":"https://avatars1.githubusercontent.com/u/25562614?v=4","gravatar_id":"","url":"https://api.github.com/users/SzNagyMisu","html_url":"https://github.com/SzNagyMisu","followers_url":"https://api.github.com/users/SzNagyMisu/followers","following_url":"https://api.github.com/users/SzNagyMisu/following{/other_user}","gists_url":"https://api.github.com/users/SzNagyMisu/gists{/gist_id}","starred_url":"https://api.github.com/users/SzNagyMisu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SzNagyMisu/subscriptions","organizations_url":"https://api.github.com/users/SzNagyMisu/orgs","repos_url":"https://api.github.com/users/SzNagyMisu/repos","events_url":"https://api.github.com/users/SzNagyMisu/events{/privacy}","received_events_url":"https://api.github.com/users/SzNagyMisu/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-03T10:09:39Z","updated_at":"2018-07-04T09:32:34Z","closed_at":"2018-07-04T09:32:34Z","author_association":"NONE","body":"### Version\r\n1.0.0-beta.18\r\n\r\n### Reproduction link\r\n[https://codesandbox.io/s/5lrvnoynx](https://codesandbox.io/s/5lrvnoynx)\r\n\r\n### Steps to reproduce\r\nWhen upgrading from `1.0.0-beta.17` (up to `1.0.0-beta.20` I tried), all my components that use `vuelidate` are unable to reach `data()`. If I try and test if the initial values are correctly set, I get an error message.\r\n\r\n### What is expected?\r\nthe properties of `vm.$options.data()` should be available for testing\r\n\r\n### What is actually happening?\r\n`data()` cannot be reached\r\n\r\n<!-- generated by vue-issues. DO NOT REMOVE -->"},"comment":{"url":"https://api.github.com/repos/vuejs/vue-test-utils/issues/comments/402422918","html_url":"https://github.com/vuejs/vue-test-utils/issues/795#issuecomment-402422918","issue_url":"https://api.github.com/repos/vuejs/vue-test-utils/issues/795","id":402422918,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMjQyMjkxOA==","user":{"login":"LinusBorg","id":1444526,"node_id":"MDQ6VXNlcjE0NDQ1MjY=","avatar_url":"https://avatars3.githubusercontent.com/u/1444526?v=4","gravatar_id":"","url":"https://api.github.com/users/LinusBorg","html_url":"https://github.com/LinusBorg","followers_url":"https://api.github.com/users/LinusBorg/followers","following_url":"https://api.github.com/users/LinusBorg/following{/other_user}","gists_url":"https://api.github.com/users/LinusBorg/gists{/gist_id}","starred_url":"https://api.github.com/users/LinusBorg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LinusBorg/subscriptions","organizations_url":"https://api.github.com/users/LinusBorg/orgs","repos_url":"https://api.github.com/users/LinusBorg/repos","events_url":"https://api.github.com/users/LinusBorg/events{/privacy}","received_events_url":"https://api.github.com/users/LinusBorg/received_events","type":"User","site_admin":false},"created_at":"2018-07-04T09:32:34Z","updated_at":"2018-07-04T09:32:34Z","author_association":"MEMBER","body":"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.\r\n\r\nBut I tried to investigate nonetheless.\r\n\r\n* Vuelidate adds a mixin that relies on `this` in the data function to be a component instance.\r\n* calling the data function  on its own directly does not do that.\r\n* calling it like this works: `vm.$options.data.call(vm)` or `data.call(vm)`\r\n\r\nThis is not related to  vue-test-utils in any way. If you do the following in main.js you get the same error:\r\n\r\n```javascript\r\nconst app = new Vue({\r\n  el: \"#app\",\r\n  components: { App },\r\n  template: '<App ref=\"app\"/>'\r\n});\r\n\r\nconsole.log(app.$refs.app.$options.data)\r\n```\r\n\r\n![grafik](https://user-images.githubusercontent.com/1444526/42269236-f032f14a-7f7d-11e8-81c6-1cae7f75ce27.png)\r\n"}}
{"actor":{"display_login":"LinusBorg"}}