Skip to content
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 is not defined on this.$data #597

Open
tsiotska opened this issue Feb 19, 2022 · 0 comments
Open

Data is not defined on this.$data #597

tsiotska opened this issue Feb 19, 2022 · 0 comments

Comments

@tsiotska
Copy link

tsiotska commented Feb 19, 2022

Using 'vue-test-utils' cannot call setData on wrapper because data exists only on "this" and not on "this.$data"
TypeError: Cannot add property dataText, object is not extensible
await wrapper.setData({dataText: 'Test'})

I added test case for that
https://github.com/tsiotska/vue-class-component/blob/fix/data-init/test/specs/test.spec.ts#L67
Could you give me some pointers how to fix this?

Also related:
vuejs/test-utils#572
vuejs/test-utils#1058

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant